It was an attempt to get this to work unsuccessfully. Any help would be appreciated.
Search for UL if any href is equal to the current URL, then move it to the top of the UL list stack.
var url = window.location.toString(); $('#partnerCharities li.panel h1 a').each(function(){ var myHref= $(this).attr('href'); if( url.match( myHref)) { $(this).parent().parent().parent().before("#slider1 li:first"); } });
This is a dynamically created list (image gallery), so not sure why jQuery is not working? This is the rough outline you see in Firebug ...
<ul id="slider"> <li class="panel cloned"></li> <li class="panel"> <article> <h1><a href="site.com">Example</a></h1> </article> </li> <li class="panel cloned"></li> </ul>
Yammi source share