Sunday 15 May 2011

html - JQuery function to fire on slideout Div appearing the first time -



html - JQuery function to fire on slideout Div appearing the first time -

i'm using slideout div slides when user places mouse over. work fire jquery phone call first time div appears.

i'm using code here

http://usabilitypost.com/2011/04/19/pure-css-slideout-interface/

so conceptually, there way trap when div slides out 1st time?

check out fiddle:

var counter = 0; $('#slideout').hover(function(){ if(counter > 0) { $(this).css('background','blue'); } else { $(this).css('background','red'); counter++; } });

this simple counter , runs reddish background once. rest of time blue. should plenty target first time shows.

jquery html css html5 css3

No comments:

Post a Comment