Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

unbind

Unbind view model from view in knockout

August 1, 2023 by Tarik

You can use ko.cleanNode to remove the bindings. You can apply this to specific DOM elements or higher level DOM containers (eg. the entire form). See http://jsfiddle.net/KRyXR/157/ for an example.

Categories forms Tags forms, knockout.js, mvvm, unbind Leave a comment

How to unbind a specific event handler

May 19, 2023 by Tarik

You have to use a named function so you can reference that specific handler when calling .unbind(), like this: function keyUpFunc(e) { if (e.keyCode == 27) { functionZzy(); } } $(document).keyup(keyUpFunc); Then later when unbinding: $(document).unbind(“keyup”, keyUpFunc);

Categories javascript Tags event-handling, events, javascript, jquery, unbind Leave a comment

jQuery bind/unbind ‘scroll’ event on $(window)

May 6, 2023 by Tarik

$(window).unbind(‘scroll’); Even though the documentation says it will remove all event handlers if called with no arguments, it is worth giving a try explicitly unbinding it. Update It worked if you used single quotes? That doesn’t sound right – as far as I know, JavaScript treats single and double quotes the same (unlike some other … Read more

Categories jquery Tags bind, jquery, unbind Leave a comment

how to unbind all event using jquery

February 6, 2023 by Tarik

You can call .unbind() without parameters to do this: $(‘p’).unbind(); From the docs: In the simplest case, with no arguments, .unbind() removes all handlers attached to the elements.

Categories jquery Tags events, jquery, unbind Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa