Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8004365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:54:11+00:00 2026-06-04T16:54:11+00:00

I have a div which includes a bunch of sentences and another div which

  • 0

I have a div which includes a bunch of sentences and another div which contains an image. When hovering on the sun, I want the words to come out from behind the sun and hovering out, go back into the sun. I don’t get the desired effect with .show() and .hide(). The words will keep on rotating while the sun is being hovered.

Here is the picture.

enter image description here

I am trying the implement whereas the words will appear from behind from the center of the sun and vice versa when hovering out.

Any idea how to implement the mentioned effect? Here is my current code. Thanks much!

$sun.hover(function(e) {
    $txt.show('slow');

    // text rotation
    var counter = 0;
    clearInterval(interval);
    interval = setInterval(function() {
        if (counter != -360) {
            counter -= 1;
            $txt.css({
                MozTransform: 'rotate(-' + -counter + 'deg)',
                WebkitTransform: 'rotate(-' + -counter + 'deg)',
                transform: 'rotate(-' + -counter + 'deg)',
            });
        }
    }, 20);

}, function(e) {
    clearInterval(interval);
    $txt.hide('slow');

});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T16:54:12+00:00Added an answer on June 4, 2026 at 4:54 pm

    using the css3 background-size :

    jsBin demo

    var $sun = $('#sun');
    var $txt = $('#text');
    var intvl;
    var c = 0;
    
        $sun.hover(function(e){
          
            clearInterval(intvl);
            intvl = setInterval(function() {
                if (c != -360) {
                    c += 1;
                    $txt.css({
                        MozTransform: 'rotate(-'+c+'deg)',
                        WebkitTransform: 'rotate(-'+c+'deg)',
                        transform: 'rotate(-'+c+'deg)'
                    });
                }
            }, 20);
          $txt.stop().animate({backgroundSize:'100%', opacity:'1'},700);
        }, function(){
            clearInterval(intvl);
            $txt.stop().animate({backgroundSize:'60%', opacity:'0.1'},400);
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a function which populates a div but includes js onclick. How ever
so I have a div which will include an image http://www.reversl.net/hovers/ and I'd like
I have a div which contains a number of images. I would like to
I have some markup which contains the firebug hidden div. (long story short, the
I have a background div with set dimensions, which includes a table element. I'm
Let's say if I have wrapper div which includes some links and images, is
This is the problem. I have an div which includes a few paragraphs of
I have a PHP application in which there is a div container which includes
I have div which has three buttons as, <div id=buttons> <input id=preview class=ButtonStyle type=submit
I have a div which I have attached an onclick event to. in this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.