Two related jQuery questions.
Is there a way in JQuery to slide to a particular point such as slide 10px or slides to a DIV, the parameters passed in the functions are speed and callback.
Second questions:
I was hoping I could filter on a name with a jQuery option so that if I had a list of buttons with the following names.
<div id="myDiv2" >
<button type="button" name="do1">Try Me!</button>
<br />
<button type="button" name="do2">Click Me!</button>
<br />
<button type="button" name="do3">Press Me!</button>
</div> <!-- End myDiv2 -->
I could select one with the following example statement:
view plaincopy to clipboardprint?
<script type="text/javascript">
$(document).ready(function(){
//if a button with a name of 'do1' is selected
$(":button:do1").click(function(){
$("div#myDiv1").hide();
});
});
</script>
Please help me with the grammar to do this.
Thanks!