jquery-live

Jquery.Live events for onadd to dom elements

What if I want not only to add events for all future added, but also want to put some data in them, execute it as an init event for them. Is there possible to use something from live tools? ...

Using accordion and "sexy combo" plugin

Hi, I am pretty new and got a following problem... case: We got an accordion and within this accordion we got an sexy-combo-box <html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> <script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt; <...

jQuery click event behaves differently with live function in Firefox

Using the event click with live function leads to strange behavior when using Firefox*. With live in Firefox, click is triggered when right-clicking also! The same does not happen in Internet Explorer 7 neither in Google Chrome. Example: Without live, go to demo and try right clicking the paragraphs. A dialog menu should appear. With...

jQuery live('click') firing for right-click

I've noticed a strange behaviour of the live() function in jQuery: <a href="#" id="normal">normal</a> <a href="#" id="live">live</a> $('#normal').click(clickHandler); $('#live').live('click', clickHandler); function clickHandler() { alert("Clicked"); return false; } That's fine and dandy until you right-click on the "live" l...

Javascript doesn't affect html code added with javascript

Hi, I'm using jquery and uploadify to upload photos to server. After uploading photos they are added to a div container using ajax. Everything works great except DELETE button. All delete buttons work on page load but those added via ajax don't work. I suppose that's because I defined function that enables image deletion and didn't use '...

Jquery Live with facebox plugin

Hello I'm trying to use the jquery facebox plugin with live events (the official implemenatation, not the plugin). My main page loads in a page via ajax. That remote page also has links to other remote pages which i would like to display in a popup dialog. I've been using the facebox plugin for this. The below code doesn't work, and s...

enable click event for anchor which was disabled using jquery

I am using the following code to disable the click event for anchor tags: //disable Click event for links except navigation $("a:not(#navigation a)").live('click', function(e) { e.preventDefault; return false; }); I need to reenable or remove the implementation which was set as above on click of an another button. How to do i...

live for jquery elastic plugin?

i use jquery elastic plugin for expanding a textbox. it works great but i want to use this on a textbox that is added to the DOM with ajax but unfortunately this plugin has no live built-in function. is there a way to solve this? http://www.unwrongest.com/projects/elastic/ ...

Jquery live - focusin fires multiple times

Hello All, I am using JQuery 1.4.1. I have HTML input elements which created dynamically. I have assigned "focusin" event all input elements. While loading page, it is triggers only once while focusing each input element. Problem is, When I minimize and maximize the page, focus event is fired multiple times. Finally it show "Stack ov...

Jquery Validation Plugin, dynamic form validation

I'm using the Jquery Validation Plugin to forms loaded via Ajax (dynamic forms). I know that as of Jquery 1.4, live events on submit is now possible. Now the problem is I want to show a confirm message after the dynamic form has been validated. My code looks like this: $('.dynamicForm').live('submit',function(){ $(this).validate(); ...

jQuery live doesn't appear to bind click event.

The dynamically added links (classnames .divToggle and .removeDiv) only function if clicked twice the first time. What is preventing them from working properly right away? $(document).ready(function(){ // adds click event to links. $('a.divToggle').live('click', function(event) { // Toggles the visibility of divs. event.preventD...

jquery live() method on custom functions

I have a custom event handler, or I suppose some call it a custom jquery function. My problem is I'm trying to apply the live() method to it. But I'm not too successful. Here's a simple custom jquery function: $.fn.myFunction = function() { return $(this).addClass('changed'); } And here I use it: $('.changePlease').myFunctio...

Jquery - event does not work on the newly created element

Hello, I have a simple comment section where users can post comments to another users post - It works pretty much in the style of facebook wall where a user can write something on the wall and other can comment on it. So I have this form where the user can enter anything and when he submits - that information is inserted in the databas...

jQuery $(element).each function doesn't work on newly added elements

Hi there, I am using .each function to iterate trough list of elements. I am having initial list of matched elements and .each works great on these. But I can add new elements via AJAX method... .each don't work on this newly added elements? I know about live events and rebinding of events for newly added elements, but .each is not ev...

JQuery show() not working with live()

I am having a very specific problem in JQuery The code below is used to Show/Hide a div. The trigger to show/hide the div will have the same ID as the div, and have classes (as selectors) showTrigger/hideTrigger respectively. wireActionPanelv3 = function(panel, fnDoThisOnShow, fnDoThisOnHide) { var id = $(panel).attr("id"); var showTr...

How to use jQuery .live() with ajax

Currently I am using John Resig's LiveQuery plugin/function - http://ejohn.org/blog/jquery-livesearch/ - to allow users to sort through a long unordered-list of list-items. The code is as follows: $('input#q').liveUpdate('ul#teams').focus(); The issue arises when I use ajaxified tabs to sort the lists. Essentially I use ajax to pull in ...

How to use the live jQuery api?

I found this jquery plugin which does exactly what I need, but I want to use it on table rows which are in an update panel, so I was hoping to use the live() jquery api to somehow keep the jquery intact across the update panel requests. Is this possible? jQuery.fn.linker = function(selector) { $(this).each(function() { va...

jquery ui sortable('refresh') not working!

I have a sortable list I'm working with that can have elements added and removed by another script through jquery and am having an odd problem. These newly generated items appear to be draggable, but they don't actually sort unless I have them already there at page load. I've tried using sortable('refresh'), but it seems to have no effe...

Loading the target of a link in a <DIV> via jQuery's .live event into the same <DIV>??

Hello together I call a certain div from another page with jquery to be loaded into a div on my main page like this: <script type="text/javascript"> $("#scotland").load("http://www.example.com/scotland .gallery"); </script> <div id="scotland"></div> The div I call is a piece of code which is automatically generated by a CMS made simp...

jquery live tabIndex

I have a jQuery statement that's working fine. How would I re-write it in .live? $(document).ready(function() { $(':input:enabled:visible, a:enabled:visible, span.ValidatorClass').each (function(i, e) { $(e).attr('tabindex', i) }); }); The reason I need this is I hide/show elements sometimes using .show and .hide and wh...