2013-01-21 3 views

Répondre

4

Vous pouvez essayer ceci:

$(function(){ 
    $(window.location.hash).fadeIn(); 
}); 
+2

la 'window.location.hash' contient déjà un #, il doit être retiré avant de l'utiliser' $ ("#" + window.location.hash.substr (1)). fadeIn(); ' –

+0

mise à jour la réponse. –

+0

Parfait les gars merci –

1

essayez ceci:

function(){ 
    var uri = window.location.pathname; 
    if(uri.indexOf("#houses") > 0){ 
     $("#houses").fadeIn(); 
    } 
} 
Questions connexes