ziedinjsh Posted March 11, 2013 Report Share Posted March 11, 2013 (edited) Sveiki!Es izmantoju šādu pieeju lai pārslēgu tabus: jQuery(function() { jQuery('.box a').livequery('click', function(e){ switch_tabs(jQuery(this)); }); switch_tabs(jQuery('.defaulttab')); function switch_tabs(obj){ jQuery('.box-content').hide(); jQuery('.box a').removeClass('selected'); var id = obj.attr("rel"); jQuery('#'+id).show(); obj.addClass("selected"); } }); Viss trādā, bet kad jQuery pārlāde Div tagu kur ir iekšā ši funkcija tad vairs nestrādā, tiek parādīti visi tabi, kapēc tā? Edited March 11, 2013 by ziedinjsh Quote Link to comment Share on other sites More sharing options...
anonīms Posted March 12, 2013 Report Share Posted March 12, 2013 Man slinkums lasīt, kas tas par livequery monstru, bet keywords varētu būt "attach behaviors" Quote Link to comment Share on other sites More sharing options...
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.