Java script on focus instead of onclick

This will run the code when your input gets focused

$(function () {
   $("#toggle").focus(function () {
      $("#yellow_div").slideToggle();
      return false;
   });
})

Leave a Comment