Blogger Plug 'n' Play

NOTICE

Adfly Links not working Find Direct Links HERE
Showing posts with label jQuery Tricks. Show all posts

MouseHover and other events not working on Disabled Input in FireFox n Sometimes in Chrome - ( Solution )

We solve this situation by adding a JS function and CSS style. We just add an overlay on disabled input field and Run mouse events on it. See demo below for full code

Learn more »

Check all checkboxes on check th check box

two functionalities og Demo

1) check all check boxes in TD on check of check box in TH of table TR
2) If we check all check box manually then check box in TH also get check.

Learn more »

Tab and Tab+Shift focus on selected div




$(document).ready(function() {

lastIndex = 0;
     $(document).keydown(function(e){
        if(e.keyCode==9)
        var thisTab = $(":focus").attr("tabindex");
if(e.keyCode == 9) {
if(e.shiftKey) {
  //Focus previous input
  if(thisTab == startIndex){
$("#"+tabLimitInID).find('[tabindex='+lastIndex+']').focus();
        return false;
        }

}else {
 if(thisTab == lastIndex){
$("#"+tabLimitInID).find('[tabindex='+startIndex+']').focus();
        return false;
        }
}
}

     });      


 var  setTabindexLimit = function(x,fancyID){
console.log(x);
     startIndex = 1;
lastIndex = x;
tabLimitInID = fancyID;
$("#"+tabLimitInID).find('[tabindex='+startIndex+']').focus();
  }

setTabindexLimit(10,"DivWithTabIndex");


});
Learn more »