[jQuery] when document.location.hash also activate the class inside of
I have index.html#members_kihon_image10 . When I enter it in URL it perfectly loads what I need. What I can't do is to also make a class selected inside of a tag on hash click? here is html here is the class that has to be activated on hash click (on regular mouse click it works) class="scrollToId_img10_lyr1" here is the jquery javascript which should be added with some that would activate the class inside of A: $(document).ready( function () { if (document.location.hash) { var pnp = document.location.hash.split('_'); $("a[href='"+pnp[0]+"']").click(); if (pnp[1]) { $("a[href='"+pnp[0]+'_'+pnp[1]+"']").click(); } if (pnp[2]) { $("a[href='"+location.hash+"']").click(); } } if ($.browser.mozilla) { $('a').click(function() { this.blur(); }); } }); Should be very easy, right? Ilia
[jQuery] document.location.hash and iFrame not working. help me please!
Dear guys, hi! Please I need a help! I have stuck with applying a click into iFrame. I have a page with navigation. so when i need to open a page from URL with a certain tabs opened and clicked. i just use document.location.hash property. It works perfectly if I put the desired (that has to be clicked) content into div. then when I type in address line index.html?tab=0#members_menu1_submenu1 it clicks all off them correctly. BUT if the last part that contains submenu i cut and put into the whole thing doesn't get initilized. I'm sure it is working correctly with divs. but how to force the document.location.hash click it in a iFrame?? so 2 clicks on the same page (#members_menu1) and third one (submenu1) in to iFrame?? PLEASE HELP! SPEND 3 days already with that!! here is .js for document.location.hash $(document).ready( function () { if (document.location.hash) { var pnp = document.location.hash.split('_'); $("a[href='"+pnp[0]+"']").click(); if (pnp[1]) { $("a[href='"+pnp[0]+'_'+pnp[1]+"']").click(); } if (pnp[2]) { $("a[href='"+location.hash+"']").click(); } } if ($.browser.mozilla) { $('a').click(function() { this.blur(); }); } });