Reputation: 8077
I'd like to be able to trigger animations based on the websites requested url. So for example www.site.com/index.php#houses
Then that would make a <div id="houses">
fade in?
Is there a simple way to do this?
Upvotes: 0
Views: 90
Reputation: 74420
You could try this:
$(function(){
$(window.location.hash).fadeIn();
});
Upvotes: 4
Reputation: 10017
try this:
function(){
var uri = window.location.pathname;
if(uri.indexOf("#houses") > 0){
$("#houses").fadeIn();
}
}
Upvotes: 1