JQuery :: Replace $.livequery With $.delegate Or $.live?

May 11, 2010

I've used nice livequery plugin for many things, not just for binding events. Now when jquery1.4.2 is out it seems like it is time to replace $.livequery() with new .delegate() or even .live(), but browser events like (ready) does not work. Am I using the incorrect event (with delegate)? For example I am using livequery:

$('ul.fileList li').livequery(function(){
var oi =$(this);
// DOM manipulation, appending menus and attaching plugins and so on

[code].....

View 1 Replies


ADVERTISEMENT

JQuery :: Events - Live -v- Livequery

May 18, 2009

I normally do this with livequery:

So any new .mylink's on a page would also be bound with my custom function.

How can I do this with the new LIVE event? or is it even possible?

View 4 Replies View Related

JQuery :: Add Class / Remove Class With Live() And/or Livequery()?

Dec 22, 2010

I have this filter in a results table that also reflect in a ui datepicker day styling (ex:available unavailable) . Everything fine till i change month or year in datepicker . Maybe i have to use live() or livequery() but can see the way .This is the code:

$("#filterSelect").change(function(){
var filtro=$("#filterSelect").val();
$("#filter-box2").val(filtro);

[code]....

View 1 Replies View Related

Script To Replace Coding On "live" Website

May 2, 2010

A small script which can be hosted on a server which you can put an url into and will show website with changes

Example, website/gallery with thumbnail images and want to change the "thumb" file to "original" file

Eg. Gallery view .../images/1a/thumbnail.jpg but want it to be able to view .../images/1a/original.jpg

I'm sure this is possible as i can't imaging it would be a very hard code but am not used to coding only basic html at the moment.

View 2 Replies View Related

JQuery :: Livequery Breaking On Inserting Html In IE?

Jul 13, 2009

I've been working on this for quite a while trying to figure out why I can only get a click to be recognized by IE once. If a user clicks on another element, and then goes back to the original one, nothing happens. I've gone right down to this

<code>
jQuery("ul.showList li.show div.showData, ul.myShowsList li.show
div.showData, ul.myFriendsShowsList li.show div.showData,
div#popForecast li.show div.showData, div#gigList li.show

[code]...

View 1 Replies View Related

JQuery :: Using Livequery With Fancybox On Dynamically Loaded Images

May 2, 2011

I have a page that contains images, and those images are displayed in a fancybox window when they are clicked. Some of these images are loaded dynamically after the page loads via AJAX.

All of the images exist inside of link tags with class="challenge_image_gallery". The code works the way it should on the images that are initially loaded on the page. However, when the new images are loaded onto the page using AJAX, the fancybox window loads two instances of the image that was clicked on rather than one as it should.

Here's the code I'm using:

View 8 Replies View Related

JQuery :: Porting Working Jq1.2.6 With Livequery + Form To Latest Jq

Apr 15, 2010

It's time for me to upgrade a significantly complex site to the latest jquery hopefully jq 1.4.2.

This code has been working well (for nearly 2 years and probably not the most optimal) on jquery 1.2.6 + livequery + jquery.forms. Trying to find the best way to port this to the jquery 1.4.2.

Not sure whether to try live() or delegate(), but would like to make sure I get good browser coverage.

View 2 Replies View Related

JQuery :: H5validate - Livequery - User Selects From A Dropdown Menu - Via AJ

May 27, 2011

I'm currently using h5validate with my forms but recently setup a few where a second form is generated based on what a user selects from a dropdown menu (via AJAX). Since the new form ID's were not existing when the document was loaded jQuery does not bind h5validate to the new form. I found a plugin called livequery that will bind new elements on the fly. Unfortunately, I'm pretty new to jQuery and can't quite figure out how to make this work with h5.

My current h5 function looks like this, where formID is the ID of the from that does not exist but is later loaded in via AJAX.

Here are the sites to the two plugins:

View 2 Replies View Related

JQuery :: Does Delegate() Work In IE At All

Sep 14, 2010

I'm trying to get a delegate() event to fire in IE (any version) with no joy. The code below works in Firefox, Safari and Chrome:

$('#gmap').delegate('a.removepoint','click', function(event){
alert('Remove');
return false; });

The link <a class="removepoint" href=""/> is created inside the infoWindow of a GoogleMap.

My understanding is that delegate() should find this, even though it's been created afterthe document.ready(), yet IE will not pick it up.

View 1 Replies View Related

JQuery :: Delegate() Be Used With A Predefined Function?

Nov 10, 2010

Here is what I have at [URL]...Basically I setup a function for message selection that will call an AJAX request. Once content is loaded via .html() in my #messages div, I could not click links from within and have to use .delegate().

The code works fine when I copy and paste code from my message_click function, but if I access the function from within .delegate(), it does not work. Is it possible to use a predefined function with .delegate() or will I have to continue to reuse code?

View 3 Replies View Related

JQuery :: Cannot Use Delegate For Scroll Events.

Jun 20, 2011

If instead of "scroll" you choose any other event ("click", "mousenter", etc), the delgate works.Is not possible to delegate scroll events?

View 1 Replies View Related

JQuery :: Loading Content With .delegate?

Aug 27, 2010

It turns out that jeditable.js will not work on any content that was .load(ed) Is there a way to use .delegate to accomplish the same as .load

View 3 Replies View Related

JQuery :: Way To Manage .click() And .delegate() On A Page?

Feb 25, 2011

I load a static page, inside this page there are links like this:

<a href="some/path/here/with/id" class="update">Click</a>

With this function I can change the link value (Click) with a second value depending on ajax response.

$('.update').click(function(event) {
event.preventDefault();
$.post('script.php', {}, function(data){

[code].....

View 3 Replies View Related

JQuery :: Delegate Submit Event Not Working

Jul 15, 2010

Why this submit event is not executing? It works fine if I change it to a "click" event and serialize the submit buttons parent form but I'd like to know why wont this work?
[code]
$(dialog).delegate("form#stayplanselect", "submit", function(event) {
event.preventDefault();
$.post("/admin/viewer/rates", $(this).serialize(), processResponse);
});
[/code]

View 4 Replies View Related

JQuery :: Delegate Event On Selection Failed In IE?

Aug 16, 2009

Demo at [URL]

Description: If you perform any selection, alert will be triggered. It fails in IE.

Code: [URL]

View 5 Replies View Related

JQuery :: .delegate() On Table Populated With .tmpl() ?

Mar 1, 2011

I'm using jQuery 1.4.4 andI can't understand where I'm doing wrong, I'm simply populating all the rows of a table with template function, so far so good, but I cant delegate the "hover" (and click and all the events) event on a row or a cell.

I've tried to put the .delegate() code also in the footer of my page but nothing.

My code actually is:

View 4 Replies View Related

JQuery :: Tooltip Plugin And Delegate - Dropdown Box And A Div ?

Dec 11, 2010

Plugin:[url]

Usage examples:[url]

I have a dropdown box and a div. Depending on what is selected in the dropdown box, different content is appended to the div using the jQuery append function. This is working without problems. But, when I append DOM that should trigger events, I am using the delegate method to accomplish this. That is also working without problems, but not with the tooltip plugin. Let me try to illustrate what I mean with some code.

jQuery

HTML

Using Firebug, the "inside delegate" is indeed printed in the console every time I hover over the text, but nothing happens with the tooltip. I have tried to insert the text directly into HTML without appending it with jQuery, removing the delegate and then it works perfectly. For some reason beyond my knowledge, I can not get the plugin to work when I append the text and use the delegate method to set the event.

View 7 Replies View Related

JQuery :: Using .delegate() Method For Table Elements

Jul 28, 2010

I've an HTML table that uses the jQuery-datatables plug-in. One of the columns in the table includes a button for adding a new row to the table immediately following the row where the button was clicked from.

My HTML code is as follows :

<table id="contactInfo">
<thead>...</thead>
<tbody>
<tr>
<td>...</td>

[Code]....

With this code, the function() to execute my button's onclick event isn't loading and therefore I cant event see the "button clicked" alert msg.

View 3 Replies View Related

JQuery :: Use Delegate Function On Document Ready Event?

Aug 5, 2011

Is there any way to use delegate function without any event or in document ready event? [code]

View 8 Replies View Related

JQuery :: Keyup Event Does Not Work In FireFox With Delegate?

Jan 17, 2011

why the following code (which counts the remaining allowed chars in html-textarea) does not work in Firefox although it works in all other browsers, IE including?

[Code]...

View 1 Replies View Related

JQuery :: Delegate Without Events / Call Function When Selection Is Matched

Apr 15, 2010

I tried to use delegate, but it is bounded with events. I don't really want to execute a function on a standard event. But I would need to change the elements that match a selector, when they appear in dom. Is possible to "unhook" delegate from events?like for all existing and new elements with class ".red" to add to the "data" a new key "initiated:true".

View 2 Replies View Related

JQuery :: Delegate To All TDs Without All With Attribute Enabled="false"

Apr 4, 2011

i'm using this code:

$("#mydiv tr:not(#tableheader)").delegate("td:not([enabled=false])", "click", function(){
alert($(this).html());
})

but it doesn't seem to work.

View 5 Replies View Related

JQuery :: Using .live() With .each()

Jul 22, 2010

I have a function that I apply to every anchor tag in a div called listnav. I do so like this:

$('.listnav a').each(function(i, el) {
$(el).click(function(ev) {
ev.preventDefault();
var href = $(this).attr('href');

[Code]....

This,among other things, causes a function called load to be called on the href of the anchor. This works fine. Howver I want to use the live() function with this as I am going to dynamically change the links in the listnav div. I tried doing it like this :

$('.listnav a').each(function(i, el) {
$(el).live('click',function(ev) {
ev.preventDefault();

[Code]....

But that does not work. My question is how would I go about changing this function so that the actions are applied to any new anchors added to the div dynamically?

View 2 Replies View Related

JQuery :: "change" Or "delegate" Don't Appear To Work With IE And Dynamic Content?

Jul 26, 2010

How can I make "change" or "delegate" work with a drop-down menu and dynamic content in IE (i.e. IE8)?

$("select.cat").live('change', function() {...
$("select").delegate(".cat","change",function() {...

Nothing seems to work with IE. Does anybody have a suggestion to address thisfrustratingmatter? What else could I try?

View 5 Replies View Related

JQuery :: On() Vs. Live() Using Version 1.7.1?

Jan 10, 2012

I am exhausted today, not to include the funk that the BCS national championship put me in, so I must be either crazy or missing something. When I do the following the code works;

[Code]...

View 3 Replies View Related

JQuery :: Using .live With Toggle?

Oct 4, 2010

how to toggle between functions, however I because I am reloading the element that contains the checkbox I am clicking, I need to use the live function (I think).

I have used live before and it works great for clicks, but can I use it with toggle.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved