livequery

Toggle Problem in live event of jquery

心不动则不痛 提交于 2019-12-06 01:22:54
I am stuck with this can anyone help me... here is the html <tr class="appendvalue"> <td colspan="2"> <asp:DropDownList ID="ddlSource" runat="server"></asp:DropDownList> <asp:TextBox ID="txtSourceValue" runat="server" CssClass="hide" /> <a href="#" class="t12">add static value</a> </td> here is the jquery $(document).ready(function() { $('.appendvalue > td > a').live("click", function(e) { e.preventDefault(); $(this).prev().prev().toggle(); $(this).prev().toggle(); $(this).toggle(function() { $(this).text("select from dropdown"); }, function() { $(this).text("add static value"); }); }); });

chrome.tabs.create is giving an error - “Uncaught TypeError: Cannot call method 'create' of undefined”

倖福魔咒の 提交于 2019-12-05 09:43:11
My manifest.json contains "content_scripts": [ { "matches": ["http://www.facebook.com/*","https://www.facebook.com/*"], "js": ["js/jquery-1.7.2.min.js", "js/jquery.livequery.min.js", "js/script.js"] } ] and the contents of script.js are $("#FB_HiddenContainer").livequery(function(){ chrome.tabs.create({"url":"http://www.google.com"}); }); When i open facebook, console reports an error Uncaught TypeError: Cannot call method 'create' of undefined at chrome-extension://whateveristhisweirdcode/js/script.js:2 How can i make it open a new tab?? Content scripts can't access most extension APIs; only

jQuery livequery plug equivalent in jQuery 1.7+

南笙酒味 提交于 2019-12-05 07:48:41
Is there the equivalent of the jQuery livequery plugin for jQuery 1.7+ ? Im trying to dynamically bind events, reading the events a DOM element should bind on based on data-* elements. <a href="#" class="js-test" data-events="click">Test 1</a> <a href="#" class="js-test" data-events="mouseover">Test 2</a> .. etc .. I want to bind all elements with class .js-test but only on the events listed in their data-events attribute. jQuery.on/live/bind/delegate all require the events to be passed in as params. This is find for DOM elements that exist on the page when document.ready, however as I update

livequery performance

一曲冷凌霜 提交于 2019-12-01 03:26:30
I've recently discovered that livequery plugin for jQuery may be quite wasteful, as it does not use event delegation but binds all bindable events and re-checks the whole DOM on each change if anyone has more information or suggestions on best practices using livequery and .live(), I would be very grateful It is rare that you would actually need a plugin like livequery . Probably the only time you really need it is if you need to react to changes to the DOM made by some other jQuery code that you can not modify . While .live() does use event delegation, it does it on the document level, which

livequery performance

本秂侑毒 提交于 2019-11-30 23:04:10
问题 I've recently discovered that livequery plugin for jQuery may be quite wasteful, as it does not use event delegation but binds all bindable events and re-checks the whole DOM on each change if anyone has more information or suggestions on best practices using livequery and .live(), I would be very grateful 回答1: It is rare that you would actually need a plugin like livequery . Probably the only time you really need it is if you need to react to changes to the DOM made by some other jQuery code

jQuery using .on and .validate must submit form twice to validate

别说谁变了你拦得住时间么 提交于 2019-11-30 06:05:29
问题 I am loading a form via ajax and usind the new .on() to load the jQuery validate plugin is not loaded before I press the submit a second time. I understand why I think. The on() function loads the validate on the form when I press submit. Is there any way to fix this? Before I was using livequery but that does not work with jQuery 1.9.1 or at least is not recommended. Here is my code: $(document) .on("submit",function(event){ $("#myform").validate(); event.preventDefault(); }) This code

Parse Cloud - LiveQueries - iOS Client doesn't work

我的梦境 提交于 2019-11-28 12:16:37
I'm trying to use Parse LiveQueries. I use this Parse "Bootstrap": " https://github.com/parse-community/parse-server ", I can see the logs: info: Create new client: 1 , but I just do not get the update in the query although I have subscribed it. It doesn't even reach the handler of the subscription.handle . config.json : { "appId": "", "masterKey": "", "appName": "", "cloud": "./cloud/main", "databaseURI": "", "publicServerURL": "", // Relevant "startLiveQueryServer": true, "liveQuery": { "classNames": ["Channel"] }, } AppDelegate.swift : // Initialize Parse. let configuration =

Parse Cloud - LiveQueries - iOS Client doesn't work

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 06:52:26
问题 I'm trying to use Parse LiveQueries. I use this Parse "Bootstrap": "https://github.com/parse-community/parse-server", I can see the logs: info: Create new client: 1 , but I just do not get the update in the query although I have subscribed it. It doesn't even reach the handler of the subscription.handle . config.json : { "appId": "", "masterKey": "", "appName": "", "cloud": "./cloud/main", "databaseURI": "", "publicServerURL": "", // Relevant "startLiveQueryServer": true, "liveQuery": {

Is livequery deprecated

吃可爱长大的小学妹 提交于 2019-11-27 01:38:40
问题 I'm looking at old code. I'm seeing that for elements that get added with ajax, there's lots of livequery code. Is livequery not needed anymore with the newer versions of jquery? Does anyone know after which version exactly it's not needed? $("#somediv").livequery(function(){ $(this).click(function(){ }); }); 回答1: livequery is an entirely different concept from .live() . The .live() method uses event delegation to handle events that occur anywhere on the page. livequery will invoke handlers

jQuery Drag And Drop Using Live Events

馋奶兔 提交于 2019-11-26 02:54:59
问题 I have an application with a long list that changes frequently, and I need the items of that list to be draggable. I\'ve been using the jQuery UI draggable plugin, but it is slow to add to 400+ list items, and has to be re-added every time new list items are added. Does anyone know of a plugin similar to the jQuery UI draggable plugin that uses jQuery 1.3\'s .live() events? This would solve both problems. 回答1: Wojtek's solution worked perfectly for me. I wound up changing it a tad bit to make