anonīms Posted September 29, 2011 Report Share Posted September 29, 2011 $('.page-effective-website-development .pane-content table tr td').hover(function() { $('#calc_baloon').show(); mouseover = true; }); pašlaik ir šādi, bet reāli tiekot uz td iekšējā div,img vai cita elementa vairs neuzskata, ka tas ir hover. Kā panākt, lai turpinātu uzskatīt nerakstot tagad katru elementu aiz komata. Quote Link to comment Share on other sites More sharing options...
0 codez Posted September 29, 2011 Report Share Posted September 29, 2011 1)Strādā events arī uz td div-iem: http://jsfiddle.net/RBTt9/ 2)Ja gribi uzlikt kaut kādai child elementu grupai eventu, tad labāk ir likt parent elementam ar delegate vienu eventu, nekā N-tos elementus uz child elementie. Ja būs 10 child elementi atšķirību nemanīsi, bet, ja būs 1000, manīsi. Quote Link to comment Share on other sites More sharing options...
0 anonīms Posted September 29, 2011 Author Report Share Posted September 29, 2011 (edited) Un, ja es sarežģītu Jums dzīvi? (devil) // $Id: jquery.js,v 1.12.2.3 2008/06/25 09:38:39 goba Exp $ :] Edited September 29, 2011 by anonīms Quote Link to comment Share on other sites More sharing options...
0 anonīms Posted September 29, 2011 Author Report Share Posted September 29, 2011 Tātad $('.page-effective-website-development .pane-content table tr td').mouseout(function() { $('#calc_baloon').hide(); mouseover = false; }); $('.page-effective-website-development .pane-content table tr').hover(function(){ $('#calc_baloon').show(); mouseover = true; }); un html izskatās tā, aj vnk te: http://jsfiddle.net/RBTt9/2/ Kāpēc tik gļukaini strādā? Quote Link to comment Share on other sites More sharing options...
0 Maris-S Posted September 29, 2011 Report Share Posted September 29, 2011 (edited) Neesmu jquery speciālists, bet vai nevajadzētu būt eventiem mouseout un mouseover, nevis hover? Vēl arī Tev sākumā ir "table tr td", bet pēc tam ir tikai "table tr". Edited September 29, 2011 by Maris-S Quote Link to comment Share on other sites More sharing options...
0 codez Posted September 29, 2011 Report Share Posted September 29, 2011 (edited) anonīms, hover events nostrādā gan uzbraucot peli, gan nobraucot. Edited September 29, 2011 by codez Quote Link to comment Share on other sites More sharing options...
0 anonīms Posted September 29, 2011 Author Report Share Posted September 29, 2011 Opā, jauns info :] Paldies. mouseover izmantoju Quote Link to comment Share on other sites More sharing options...
Question
anonīms
pašlaik ir šādi, bet reāli tiekot uz td iekšējā div,img vai cita elementa vairs neuzskata, ka tas ir hover.
Kā panākt, lai turpinātu uzskatīt nerakstot tagad katru elementu aiz komata.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.