/ Published in: jQuery

Redirect Links to Internal Page with Orignal Link as #hash
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
jQuery("div#listings-widget a").each(function() { var path = jQuery(this).attr('href'); var newpath = "http://localhost/WandP/listings/#" + path; jQuery(this).attr('href', newpath); }); //Find #hash in current url and load in iframe var url = window.location; var anchor = url.hash; var newanchor = url.hash.substring(1); jQuery(document).ready(function() { jQuery("iframe").attr("src", newanchor); });
Comments
