How to use unbind and bind event in javascript
.Net
How to use unbind and bind event in javascript
1. bind()
$("#BoxId").bind("click", (function () {
$('span').text("Single Clicked");
}));
2. unbind()
Unbind or detached the existing events is quite easy, just need to specified the attached event type.
Detached the “click” and “dblclick” event from elements with an Id of “BoxId”.
$('#BoxId').unbind("click");
$('#BoxId').unbind("dblclick");
bind unbind same time
for form submit
$("#CrudRateTierItem").unbind("submit").bind("submit", function (e) { });
for button cick
$("#CrudRateTierItem").unbind("click").bind("click", function (e) { });
Avantages:
it will disable multiple clicks and multiple form submission
How to use unbind and bind event in javascript
1. bind()
$("#BoxId").bind("click", (function () {
$('span').text("Single Clicked");
}));
2. unbind()
Unbind or detached the existing events is quite easy, just need to specified the attached event type.
Detached the “click” and “dblclick” event from elements with an Id of “BoxId”.
$('#BoxId').unbind("click");
$('#BoxId').unbind("dblclick");
bind unbind same time
for form submit
$("#CrudRateTierItem").unbind("submit").bind("submit", function (e) { });
for button cick
$("#CrudRateTierItem").unbind("click").bind("click", function (e) { });
Avantages:
it will disable multiple clicks and multiple form submission
Share This with your friend by choosing any social account
You may also read following recent Post
![]() |
How old are you and what is your net worth? Also, what is your educational background and what sort of a job do you do? Do you enjoy your work?
47 By Nauman Shafi |
![]() |
create appointment booking page with available time slot using database ms sql server
49 By Junaid A |
![]() |
what is Asp.Net Core
64 By Junaid A |
![]() |
publish has encountered an error Object reference not set to an instance of an object A diagnostic log has been written to following location
96 By Junaid A |
![]() |
The provided URI scheme 'http' is invalid; expected 'https'." & vbCrLf & "Parameter name: via
105 By Junaid A |
![]() |
C# Language Basics
1667 By |
![]() |
Crud in Asp.NET using tabs
635 By Haider |
![]() |
Parser Error
699 By Usman Jafar |
![]() |
What are 3 C
192 By |
![]() |
what is .net
418 By |
![]() |
How to post uploaded file and form data in MVC using jquery?ts Common scenario where you want to pos
224 By |
![]() |
MVC url routing
263 By |
![]() |
Learn about Session
287 By |