How can i toggle a div closed using jquery ie hide the box below (close it) if #something is present in the URL http://www.mydomain.co.uk/index.php#something
<div id="feature">content</div>
How can i toggle a div closed using jquery ie hide the box below (close it) if #something is present in the URL http://www.mydomain.co.uk/index.php#something
<div id="feature">content</div>
By checking the window.location.hash
.
if (window.location.hash == "something") $("#featured").hide();
$(function() {
if(window.location.hash.indexOf('something') !== -1) {
$('div#feature').hide();
}
});