javascript - any same way in js as I have in css? -


i trying find same thing, have not found yet. ( been searching hours. )

i got hovered tie gets big square. (see link see ment: http://rdv-design.com/stageverslag2/home.html

just different want when hover tie , square comes out, square not disappear when put mouse on div that's above it. when put mouse outside box of hovered tie (square), want disappear.

anyone has idea?

thanks!

in showdiv.js, you've got this:

$(function() {     $('.vierkant').hover(         function() {              $('#tekst').show();          } else {              $('#tekst').hide();          }     ); }); 

this isn't valid, else not part of if. think want is:

$('.vierkant').hover(function() { $('#tekst').show(); },                      function() { $('#tekst').hide(); }); 

this call .hover() uses 2 functions, 1 when mouse enters (show) , 1 when mouse leaves (hide). once done, hover event handled accordingly.

see also: jquery api .hover().

edit: there .childen() jquery selector may help. although believe hover function should apply children of .vierkant, may wish do:

$('.vierkant').children().hover(function() { $('#tekst').show(); },                                 function() { $('#tekst').hide(); }); 

assuming content in #tekst block child node.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -