jquery - Find out where a "#" link is pointing? -


i have link here

<a href="#" id="gallery_search"    data-filter=".<?php echo $filterclass; ?>"><?php echo strtoupper($ui); ?></a> 

when click it, reloads page (without refresh) , shows different result based on data-filter is.

pretty simple.

problem i'd find out link leads can alter it, , go straight it.

my domain http://explorerhinelander.com/rsd (wordpress installation)

when try go http://explorerhinelander.com/rsd/#gallery_search not load page in same way if clicked link. reloads whatever there.

i need know how url of link leads. firebug shows it's "#".

in down of page have next script

jquery(function () {     jquery("#gallery-bank-thumbnails_3413 > > div.gb_overlay").addclass("animated overlay");     jquery(".imgliquidfill").imgliquid({fill: true});     jquery("#holder_3413").jpages({containerid: "gallery-bank-thumbnails_3413", perpage:18,animation:"overlay"}); }); var $optionsets = jquery("#bank_filters_3413"), // container links     $optionlinks = $optionsets.find("a"); //find <a> tags in container     $optionlinks.click(function () { // add onclick event handler         var selector_3413 = jquery(this).attr("data-filter"); //get filter string         if (selector_3413 != "*") { //if not show             jquery("#gallery-bank-thumbnails_3413 > > div.margin_thumbs").addclass("jp-hidden"); // hide             jquery("#gallery-bank-thumbnails_3413 > a" + selector_3413 + " > div.margin_thumbs").removeclass("jp-hidden"); // delete class hide filtered             jquery("#gallery-bank-thumbnails_3413 > a" + selector_3413 + " > div.margin_thumbs").css("display", ""); // show filtered         }         else { //if show             jquery("#gallery-bank-thumbnails_3413 > > div.margin_thumbs").removeclass("jp-hidden"); //remove class hide             jquery("#gallery-bank-thumbnails_3413 > a" + selector_3413 + " > div.margin_thumbs").removeclass("animated overlay"); //remove class overlay             jquery("#gallery-bank-thumbnails_3413 > > div.margin_thumbs").css("display", ""); // show         }         jquery("#holder_3413").jpages({containerid: "gallery-bank-thumbnails_3413", perpage:18,animation:"overlay"});         return false;     });     jquery("#bank_filters_3413 a").on("click", function () {         jquery("#bank_filters_3413").find(".act").removeclass("act");         jquery(this).addclass("act");     }); 

in fact script simple change css loaded div, without ajax or ajax :-)


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -