jquery - Loosing active class of bootstrap thumbnail when clicking any other control of the page -


loosing css of bootstrap thumbnai link when clicking other control or page css-

a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active  {   border-color: gray;   color:#003300;   background-color:#addea } 

you can run below jquery force active class current anchor.

$('a.thumbnail').click(function(){     //remove active a.thumbnail     $('a.thumbnail').removeclass('active');     //add current active item     $(this).addclass('active');  }); 

http://jsfiddle.net/seanwessell/cbrr5mwc/


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -