¡@

Home 

2014/10/16 ¤W¤È 12:02:44

jquery Programming Glossary: currenturl

Dynamic Facebook comment counter link

http://stackoverflow.com/questions/11640042/dynamic-facebook-comment-counter-link

I am using function var links '.details' matchExp PAGEURL currentURL '.series' .attr 'href' links.each function var currentHREF this.. matchExp this .attr 'href' currentHREF.replace matchExp currentURL And here is the HTML div class details div class series a href.. div we look for an a element and we save its href value in currentURL var currentURL this .find 'div.series a' .attr 'href' again..

Submenu stay open on menu click

http://stackoverflow.com/questions/8300261/submenu-stay-open-on-menu-click

.addClass 'active' ul.submenu li a .each function var currentURL document.location.href var thisURL this .attr href if currentURL.indexOf.. document.location.href var thisURL this .attr href if currentURL.indexOf thisURL 1 this .parent ul.submenu .css 'display' 'block'.. .addClass 'active' ul.submenu li a .each function var currentURL document.location.href var thisURL this .attr href if currentURL.indexOf..

Dynamic Facebook comment counter link

http://stackoverflow.com/questions/11640042/dynamic-facebook-comment-counter-link

.details class on the page. Here is the JavaScript that I am using function var links '.details' matchExp PAGEURL currentURL '.series' .attr 'href' links.each function var currentHREF this .attr 'href' if currentHREF.match matchExp this .attr 'href'.. var currentHREF this .attr 'href' if currentHREF.match matchExp this .attr 'href' currentHREF.replace matchExp currentURL And here is the HTML div class details div class series a href MyLink.php text a div fb comments count href PAGEURL fb.. div.details .each function index elem within each details div we look for an a element and we save its href value in currentURL var currentURL this .find 'div.series a' .attr 'href' again within the details div we search for any element who's href..

Submenu stay open on menu click

http://stackoverflow.com/questions/8300261/submenu-stay-open-on-menu-click

'a' .filter function return this.href document.location.href .addClass 'active' ul.submenu li a .each function var currentURL document.location.href var thisURL this .attr href if currentURL.indexOf thisURL 1 this .parent ul.submenu .css 'display'.. .addClass 'active' ul.submenu li a .each function var currentURL document.location.href var thisURL this .attr href if currentURL.indexOf thisURL 1 this .parent ul.submenu .css 'display' 'block' And the css #topnav ul list style none padding 0 margin.. 'a' .filter function return this.href document.location.href .addClass 'active' ul.submenu li a .each function var currentURL document.location.href var thisURL this .attr href if currentURL.indexOf thisURL 1 this .parents ul.submenu .css 'display'..