Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to use focus() Method Jquery ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 280
    Comment on it

    Hi Reader's,
      Welcome to FindNerd, today we are going to discuss how to use focus() Method in Jquery.

      Basically focus() Method event when an element gets focus with selected by mouse to it.
      So we can say that  focus event triggers the focus event.

    Note:The focus() Method is sent to an element when it gains focus. focus() Method is implicitly applicable to a inhibited set of elements, such as below element:
      b)<a href>

    Syntax of focus() Method


    you can see below example:

    <!DOCTYPE html>
    span {
        display: none;
    <!-- here add jquery library -->
    <script src=""></script>
      //here call focus() method
            $("span").css("display", "inline").fadeOut(4000);
    <!-- define a input box -->
    <span>please enter your name</span>
    <!-- when you click in the input field then you will get focus with massage -->


 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: