javascript - How to highlight current id element in HTML -


i want highlight current '#id' fragment:

like if url : http://localhost:4321/store/zapakshop/#943

then id=943 should highlighted..

i have tried not working:

$(document).ready(function () {     $(window.location.hash).effect("highlight", {         color: "#ff0000"     }, 3000);            }); 

help me...

yes working changing color permanently want flash... – user2217267

snook has nice example of doing css3. here working example, adapted page:

<!doctype html> <html lang="en"> <head> <meta charset="utf-8">  <style type="text/css" media="all"> :target {     -webkit-animation: target-fade 3s 1;     -moz-animation: target-fade 3s 1; }  @-webkit-keyframes target-fade {     0% { background-color: rgba(0,0,0,.1); }     100% { background-color: rgba(0,0,0,0); } }  @-moz-keyframes target-fade {     0% { background-color: rgba(0,0,0,.1); }     100% { background-color: rgba(0,0,0,0); } } </style>  </head>  <body> <p>click link <a href="#goal">target div</a>.   <div id="goal">this div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. div. </div>  </body> </html> 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -