unbind

Unbind/Destroy fancybox 2 events

爷,独闯天下 提交于 2019-12-01 01:11:36
问题 I am having a strange issue, I have code that pulls content via ajax and then binds Fancybox (2) to certain elements. The issue is that when I "refresh" this page I call the same function that pulls and binds Fancybox again. My normal approach that has been working up until I changed to Fancybox 2 is to unbind the elements and rebind them. This however does not seem to be working with FB2. I have tried the following: $('.tool_button').unbind('click.fb'); $('.tool_button').unbind('click'); $('

Unbind view model from view in knockout

喜你入骨 提交于 2019-11-30 06:04:48
I'm looking for unbind functionality in knockout. Unfortunately googling and looking through questions asked here didn't give me any useful information on the topic. I will provide an example to illustrate what kind of functionality is required. Lets say i have a form with several inputs. Also i have a view model binded to this form. For some reason as a reaction on user action i need to unbind my view model from the form, i.e. since the action is done i want all my observables to stop reacting on changes of corresponding values and vise versa - any changes done to observables shouldn't affect

Unbind jquery plugins

雨燕双飞 提交于 2019-11-29 16:46:25
I'm sure this is simple but I'm banging my head! I'm using the excellent jQuery plugin editable ( http://www.appelsiini.net/projects/jeditable ). Users can create a form on the fly, and click to edit the title, the body of the text, whatnot. Every time the user creates a new question, I rebind the plugin like so: $('.edit').editable() Where every element with class 'edit', should be editable. The problem is, previous 'edit' elements seem to get double bound... that is, when you click to edit them, an input field shows up, containing the following: <input class=""> Which makes sense since it's

Unbind view model from view in knockout

ぐ巨炮叔叔 提交于 2019-11-29 06:00:46
问题 I'm looking for unbind functionality in knockout. Unfortunately googling and looking through questions asked here didn't give me any useful information on the topic. I will provide an example to illustrate what kind of functionality is required. Lets say i have a form with several inputs. Also i have a view model binded to this form. For some reason as a reaction on user action i need to unbind my view model from the form, i.e. since the action is done i want all my observables to stop

jQuery - unbind or rebind hoverIntent()?

痞子三分冷 提交于 2019-11-28 21:38:42
I have a menu bar that displays a set of categories in an upper row. One of the categories has a set of sub-categories. I have a hoverIntent setup so that it will slideDown the submenu, and slideUp when the mouse leaves. However, if I am viewing a page in this category, I would like the submenu to be visible with the active category highlighted. I would also like to make sure that when the submenu is interacted with via the mouse, it does not slideUp again once the mouse leaves. I have tried redeclaring the hoverIntent function on the element in this page but it does not work, it is still

first unbind click and then bind (jquery)

筅森魡賤 提交于 2019-11-28 21:14:56
1.I have a onclick event on, $('#locations').click(function(){ $('#train').unbind('click'); //do some stuff } 2.Once the close button is clicked $('.close').click(function(){ //do some stuff } 3.Then again if I click #train $('#train').bind('click', function() { alert('train is clicked'); //do some stuff } Now the problem is #train is not firing.Is it to bind the event again on .close function? Please suggest.Thanks in advance. krishgopinath Looking at your question, you do not seem to bind back the click after you unbind it, so it will not fire. (Assuming you've kept the sequence of your

Unbind jquery plugins

佐手、 提交于 2019-11-28 10:59:34
问题 I'm sure this is simple but I'm banging my head! I'm using the excellent jQuery plugin editable (http://www.appelsiini.net/projects/jeditable). Users can create a form on the fly, and click to edit the title, the body of the text, whatnot. Every time the user creates a new question, I rebind the plugin like so: $('.edit').editable() Where every element with class 'edit', should be editable. The problem is, previous 'edit' elements seem to get double bound... that is, when you click to edit

jQuery bind/unbind 'scroll' event on $(window)

人走茶凉 提交于 2019-11-28 07:08:52
I have this function: function block_scroll(key){ if (key) { $(window).bind("scroll", function(){ $('html, body').animate({scrollTop:0}, 'fast'); }); } else { $(window).unbind(); } } The first part works as it should, but when I later call block_scroll(false) - it's still blocking. Wat do? RE-EDIT So as suggested I tried... $(window).unbind("scroll"); ...with some confusion. At first it didn't work - then it worked. Now I think it failed because I was scrolling the moment block_scroll(false) was called. I've tested this several times now. And yes, if I do nothing while the script runs and

Remove jQuery tablesorter from table

若如初见. 提交于 2019-11-28 01:50:43
I am using the jQuery tablesorter (http://tablesorter.com). After being applied to a table by $('#myTable').tablesorter() , how can I remove it again from the table? There isn't a built-in function to do this, but you could remove the class names and event bindings to stop its functioning... try something like this: $('table') .unbind('appendCache applyWidgetId applyWidgets sorton update updateCell') .removeClass('tablesorter') .find('thead th') .unbind('click mousedown') .removeClass('header headerSortDown headerSortUp'); The above won't work if you have the pager plugin running. Volker

jQuery - unbind or rebind hoverIntent()?

◇◆丶佛笑我妖孽 提交于 2019-11-27 14:02:05
问题 I have a menu bar that displays a set of categories in an upper row. One of the categories has a set of sub-categories. I have a hoverIntent setup so that it will slideDown the submenu, and slideUp when the mouse leaves. However, if I am viewing a page in this category, I would like the submenu to be visible with the active category highlighted. I would also like to make sure that when the submenu is interacted with via the mouse, it does not slideUp again once the mouse leaves. I have tried