Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://jquery.com/" rel="nofollow">jQuery</a> is a lot easier, but with pure javascript you can do it.</p> <p>In the CSS you'll need to use transitions</p> <pre><code>#thing { position:relative; top: 0px; opacity: 0.8; -moz-transition: top 1s linear, opacity 1s linear; -webkit-transition: top 1s linear, opacity 1s linear; } </code></pre> <p>then in the javascript when you change the position of the element, it should change via the css transitions.</p> <pre><code>var toggleUpdatesPulldown = function(event, element, user_id) { if( element.className=='updates_pulldown' ) { element.style.top = someValue; //something like '100px' will slide it down 100px element.style.opacity = '1.0'; //will fade the content in from 0.8 opacity to 1.0 element.className= 'updates_pulldown_active'; showNotifications(); </code></pre> <p><br /><br /> <strong>EDIT - provided jQuery code</strong></p> <p>call the jQuery library, most easily done from the google hosting</p> <pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"&gt;&lt;/script&gt; </code></pre> <p>make the hover function</p> <pre><code>$(document).ready(function() { $('.updates_pulldown').hover( //first function is mouseon, second is mouseout function() { $(this).animate({top: '50px'}).animate({opacity: '1.0'}); }, function() { //delay 1000 milliseconds, animate both position and opacity $(this).delay(1000).animate({top: '0px'}).animate({opacity: '0.5'}); } ) }) </code></pre> <p>the function timing will be the same as whatever you set it to in the css with transition tags. using 'this' instead of the class name again makes sure that the effect only occurs on the specific instance of the class that is hovered over. im not sure if this animation is exactly what you were asking for, but if i understand the question correctly then the main functionality will work for you. just change the numbers and such to fit your needs.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload