you can user unbind
 
$('#myButton').unbind("click")
 
 
------------------ Original ------------------
From:  "Andy Matthews"<[EMAIL PROTECTED]>;
Date:  2008年7月12日(星期六) 凌晨00:50
To:  "jquery-en"<jquery-en@googlegroups.com>; 
Subject:  [jQuery] Re: Button Click

 

<!-- the jQuery -->
<script type="text/javascript">
<!--
     $(document).ready(function(){
          $('#myButton').click(function(){
               location.href='/Tag/ List?page=1';
          });
     });
//-->
</script>

<!-- the button -->
<input type="button" id="myButton" value="click me" /> 

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of shapper
Sent: Friday, July 11, 2008 11:40 AM
To: jQuery (English)
Subject: [jQuery] Button Click


Hello,

I have a button which redirects to a page:
<button  class="Cancel"  type="button" onclick="location.href='/Tag/
List?page=1'" id="Cancel">Cancel</button>

Should I remove the onclick from the button and do this with JQuery?

And how can I do that using JQuery?

Thanks,
Miguel

Reply via email to