Thread Starter
skupke
(@skupke)
This is so awesome. Thanks!
Thread Starter
skupke
(@skupke)
Hello Mikko, thanks for the hint. I tried a lot but I failed. The Searchquery is in the URL. So I tried to fetch it out of the URL.
This is my JS:
function $_GET(param) {
var vars = {};
window.location.href.replace( location.hash, '' ).replace(
/[?&]+([^=&]+)=?([^&]*)?/gi, // regexp
function( m, key, value ) { // callback
vars[key] = value !== undefined ? value : '';
}
);
return vars;
}
var mySearchString = $_GET("hilite");
//my Theme needs a starting jQuery in the Editor
jQuery(
function searchscroll(Str) {
$(window).scrollTop(-80 + $("p:contains(Str):first-child").offset().top);
alert("test");
}
searchscroll(mySearchString);
);
Can u help me?