javascript - How to scroll to an element in jQuery? -


I have made the following code in JavaScript to pay attention to the particular element (branch 1 is an element),

  document.location.href = "# Branch1";  

But as I am using jQuery in my web app, I want to do the above code in jQuery. I have tried, but do not know why it is not working,

  $ ("# branch1"). Focus ();  

The above jquery (focus ()) code is not working for the div, although I'm trying the same code with the textbox, its functions,

< P> Please tell me, how can I focus on a div elemnt using jQuery?

Thanks

Check, I think that is the behavior you want , Check it out.


Comments