я сделал в следующий способ
$(document).ready(function(){
if(document.location.href.indexOf('#') > -1){
var id = location.hash.replace("#","");
$thisAns = $("#"+id);
$thisAns.addClass("highlightAns");
// Remove that class after 2 seconds
setTimeout(function(){
$thisAns.removeClass("highlightAns");
},2000);
}
else{
console.log("URL does not contains Id");
}
$('.highlight').on('click', function() {
// Get the div that should be higlighted now
var id = $(this).attr('href').replace("#", "");
$thisAns = $('#'+id);
// Add highlightAns class
$thisAns.addClass("highlightAns");
// Remove that class after 2 seconds
setTimeout(function(){
$thisAns.removeClass("highlightAns");
},2000);
});
});
размытый фон вы имеете в виду? – Albzi
есть fade фон .. –
второй link не работает. –