Passing a search box value to jQuery
I have successfully set up & tested the use of the
LocalScroll plugin on my project (which also uses the
ScrollTo plugin). Having just started using jQuery today, I was trying to figure out how you would pass a value entered into a search box through to jQuery.
The LocalScroll plugin scrolls using anchor tags that reference the ID of the element. So clicking the "This is some text" link below...
- <a href="#myID">This is some text</a>
would scroll to the element with the ID of myID.
What I am wanting to do is provide a search box so that when the user enters a value (i.e., myID) and clicks the Search button, this value is passed to LocalScroll as the ID value to scroll to. It would be like clicking the link "This is some text" above. Is this possible? If there is a tutorial on how to do this, a link would be greatly appreciated. Thanks!