Re: [jQuery] binding ala ActionScript??

2009-12-03 Thread Karl Swedberg
I've never actually tried this plugin myself, but it looks like it might help you do what you're asking about: http://wiki.github.com/raid-ox/chain.js/ --Karl Karl Swedberg www.englishrules.com www.learningjquery.com On Dec 2, 2009, at 1:16 PM, hsfrey wrote: Do jQuery or Ja

[jQuery] binding ala ActionScript??

2009-12-02 Thread hsfrey
Do jQuery or JavaScript provide any facility like the data-binding facility of ActionScript, whereby changing a variable immediately applies the changed value throughout the program? Apparently that works by implementing an onChange event whenever the variable is changed.

Re: [jQuery] Binding a function to >1 'a' tag - which approach is best?

2009-11-27 Thread Michel Belleville
Now let's try to simplify this a bit : $('a.c_update').each(function() { var $a = $(this); var q = $a.attr('id'); $a.bind("click", function() { doStuff('getitem',q); // hmm, I don't like this variable much... return false; }); }); $('a.c_update').each(function() { var $a = $(this); $a.bind("click

[jQuery] Binding a function to >1 'a' tag - which approach is best?

2009-11-27 Thread Bruce MacKay
Hello folks, I have some html returned via ajax that contains several 'a' tags to which I am binding a function. Both of the following methods does the job, but my perception of other posts about this general practice from more wiser folk than me is that the first method is the "better" method.

[jQuery] Binding multiple markups to multiple markups?

2009-11-24 Thread Photonic
I am new to jQuery, and I attempted to search this forum, as well as go through most of the tutorials. I could not find out if this was possible. I am attempting to create a list of links that, when clicked, will show a div section below them. Now, I can do that individually. However, I would like

[jQuery] Binding Google Maps V3 InfoWindow links

2009-11-01 Thread benji
Hi - Hope someone can help me out. Have spent days now trying to get this running! I am tying to bind a function to a link that is created dynamically in the DOM when a Google Maps InfoWindow is fired. Specifically, getting a JQuery Coda Slider 1.1.1 to work. You can see the test site here - [cl

[jQuery] Binding a unique single and double click command

2009-09-29 Thread Sam
I'm trying to write some jQuery to do the following: If a user clicks once on an object, do X. If a user clicks twice on an object, do Y, but not X. I've been having some trouble with this as, obviously, a double-click will trigger the single-click twice. Here is a failed attempt: $('.todo

[jQuery] binding events to dynamically created divs

2009-08-26 Thread batterhead
Hi All, I have a page with a div that contains other divs. In the outer div, I have links that add new divs inside. I also have a link outside the outer div that adds more of those outer divs to the page (with an inner div, and the same links to add more). This works on the div that is hard coded

[jQuery] binding "text" event

2009-08-04 Thread park
Just noticed that a "text" event can be binded to an input: $(’:text’).bind(’text’, function () {console.log($(this).val()}); But it is not documented here. http://docs.jquery.com/Events/bind. Google fails to help either. This event turns out extremely useful when handling Chinese input, but do

[jQuery] Binding of object

2009-07-21 Thread sken
Hey, is it possible to get the "binding" of an object. Let`s say i do $("#login").click(function); so the next time i call $("#login") i want to check if a click event is already bind to that obejct. So that i don't have a double binding (in this case the click is doubletriggered) My solution w

[jQuery] Binding Events on a Click

2009-07-16 Thread pinman
Hello, as a complete beginner in the world of jQuery I'm struggling both with the concept and coding of what I am trying to achieve and would appreciate any help you guys can offer :-) I'd like to have a hyperlink on a page, that when clicked reveals some hidden text below the hyperlink AND at th

[jQuery] binding and re-binding

2009-06-11 Thread Sasha
Hi everyone. I've run across what must be a common problem: When my page loads, I bind every element of a certain class to some function (via click, focus, or whatever). Then I dynamically create another element with that same class on the page, and the new element lacks the binding. Is there

[jQuery] Binding one function to multiple events causes overwriting?

2009-06-04 Thread CBowles
If I set up some functions like this: myFunctions = { foo: function() { alert("Foo"); }, doFoo: function() { myFunctions.foo(); } } And then in .ready() make the following calls: $(window).bind("eventFoo", myFunctions.foo); $(window).bind("eventBar", myFunctions.foo); >From

[jQuery] binding to an event in the-silky-smooth-marquee

2009-05-23 Thread Scott Grizzard
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am trying to bind to a trigger issued by the silky smooth marquee based on jquery (http://remysharp.com/2008/09/10/the-silky-smooth-marquee/) Every time the marquee loops, I want to issue an alert. This is done by binding to the 'stop' event, acco

[jQuery] binding

2009-05-15 Thread runrunforest
Hi, How can I bind this function to all image tag ? var img_width = $('#slide img:visible').width(); var frame_width = $('#slide img:visible').parent().width(); var target_width = (frame_width-img_width)/2; $('#slide img:visible').css({'left':target_width}); appr

[jQuery] Binding hrefs in table entries

2009-05-02 Thread Ingo
Hi, I'm quite new to jQuery and have a question. I'm populating a table with rows where some of the columns include links and buttons. For some of these links and buttons I want to run some jQuery stuff before it's redirected (acually, I want to have the result loaded in a div via ajax). In the

[jQuery] binding event handlers to the new rows

2009-04-17 Thread mohan prasad
hello, i have written two event handlers one on click of anchor tag class (edit_item), another on click of row column class(show_subitems) as mentioned below. For the first time page load, its working perfectly(i am providing event handler code inside jquery(document).ready) So event handler is g

[jQuery] binding after .get()

2009-04-16 Thread hphoeksma
Hi, I am new to jQuery and can't get my head around the binding concept. I read some posts about it, but can't seem to figure out how to bind data coming from $.get('script.php', {'c': c, 'sc': sc }, function (data) {...} It's now loaded using: $('form').html(data); replacing the normal form com

[jQuery] binding after .get()

2009-04-16 Thread hphoeksma
Hi all, new to jQuery I am having difficulty on the binding concept. Currently using this function to regenerate a full form based on a PHP script. -- $("select").change(function () { $.get('script.php', {'c': c, 'sc': sc }, function(data) { $('form').html(data); });

[jQuery] Re: jQuery - Binding to Ajax Event

2009-01-10 Thread Mike Alsup
> Use ajaxStop instead of ajaxComplete.  ajaxComplete fires for each > individual ajax call.  ajaxStop fires when there are no longer any > ajax calls running. This page demonstrates the difference in those calls: http://www.malsup.com/jquery/ajax/

[jQuery] Re: jQuery - Binding to Ajax Event

2009-01-10 Thread Mike Alsup
> I am developing a portal and i am kind of stuck. > I am using multiple AJAX calls to get data dynamically from a JSON > file. > > In one page I am making 2 AJAX calls, and I want to call a function on > call back from AJAX. I found out a way to do it, its something like > this, > >         $(win

[jQuery] Re: jQuery - Binding to Ajax Event

2009-01-10 Thread jQuery Lover
var canI = true; $(window).bind("ajaxComplete", function() { function1(); }); function function1(){ if(canI){ // your function1() code here } }; Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Thu, Jan 8, 2009 at 5:02 PM, goodsanket wrote: > > Hi all > > I am deve

[jQuery] Re: jQuery - Binding to Ajax Event

2009-01-08 Thread jQuery Lover
Why don't you use jQuery's helper function $.getJSON( url, [data], [callback] ) http://docs.jquery.com/Ajax/jQuery.getJSON#urldatacallback jQuery HowTo Resource - http://jquery-howto.blogspot.com On Fri, Jan 9, 2009 at 9:32 AM, goodsanket wrote: > > Hi all > > I am developing a portal and

[jQuery] jQuery - Binding to Ajax Event

2009-01-08 Thread goodsanket
Hi all I am developing a portal and i am kind of stuck. I am using multiple AJAX calls to get data dynamically from a JSON file. In one page I am making 2 AJAX calls, and I want to call a function on call back from AJAX. I found out a way to do it, its something like this, $(window).bin

[jQuery] jQuery - Binding to Ajax Event

2009-01-08 Thread goodsanket
Hi all I am developing a portal and i am kind of stuck. I am using multiple AJAX calls to get data dynamically from a JSON file. In one page I am making 2 AJAX calls, and I want to call a function on call back from AJAX. I found out a way to do it, its something like this, $(window).bi

[jQuery] binding solution

2008-10-28 Thread RyOnLife
I am having a binding issue. I've read enough in the jQuery docs and on this forum to have a cursory understanding. Without many examples to refer to, I am unsure of how to implement Live Query in order fix. I'm calling this refreshLabels() function each time a form checkbox is clicked. On the fi

[jQuery] Binding multiple custom namespaced events not working correctly

2008-10-28 Thread Tim Molendijk
Hello, Run the following code snippet in Firefox and open up Firebug. It fires a custom event upon left or right click. The handlers for 'myclick.left' and 'myclick.right' work as expected. The problem is that 'any click' is only logged to the console in case of a right click, and not in case of

[jQuery] Binding Click & Double Click on the same object ?

2008-08-27 Thread Liam Byrne
Hi folks I did this before and can't remember how. If click and double-click are both bound to the same object, how can I stop the "click" from firing during "double-click" ? Thanks, Liam

[jQuery] Re: option to see evidence of jquery binding in the html markup?

2008-08-18 Thread chrismarx
yup, thats exactly what i want. i'll see about creating a plugin that modifies the bind function, thanks! On Aug 16, 5:01 am, "Karl Rudd" <[EMAIL PROTECTED]> wrote: > Not sure exactly what you want to see. Is it that you have an existing > page with a bunch of jQuery events added (most likely tha

[jQuery] binding submit with ajax() inside

2008-07-01 Thread armsteadj1
In the code below if i uncomment the return true; it will automatically submit the data instead of running the ajax.. is there anyway to get the $.ajax function to return the true or false value for the submit function? or have that if statement at the bottom wait for the $ajax to be done?

[jQuery] Binding Event to Dynamically Created Element (works in FF but not in IE)

2008-06-21 Thread MysteryNerd
I'm in the process of converting standard javascript code to jQuery, it has already save tons of lines of code and make it more manageable. I'm a bit stumped to why this works in FF and not in IE using jQuery bind. -- Snippets -- var BigBox = { init : function () { ... this.loadElement

[jQuery] Binding in jQuery

2008-06-16 Thread markhuot
Ok, so I know that the Prototype `bind` method isn't the correct way to go about things in jQuery. The problem is I don't know what the correct way is…So, I offer up an example: $(document).ready(function(){ $('h2.countdown[paused="no"]').each(function(){ this.update = fun

[jQuery] Binding submit events via Taconite

2008-04-18 Thread lvp1138
Hi guys, Due to the problem with IE unable to "rebind" onclick events, I am now binding click events via Taconite's EVAL command. All I want to do is, when the user clicks on the "submit" button, a "loading" animation to appear. Before going any further, please be aware that the way our app is

[jQuery] Binding click event handlers to dynamically added links

2008-04-15 Thread lcordier
Hi, I am trying to bind Ajax click event handlers to links that I have dynamically appended to the DOM tree. Basically I have: var html = 'text' $("#table > tbody").append(html); If I try to add click handlers to these anchor tags, they don't work. $("a").each(function(i, dom_element) {

[jQuery] binding jquery_auto with livequery?

2008-02-08 Thread Joel S
Hi all I've got jquery_auto working well for auto.submit, however when I reload the via AJAX, I can't get the auto.submit to work. I'm using livequery on the same page for cluetips in the reloaded divs, and that works great. I'm thinking I should be able to do something similar to get auto.sub

[jQuery] binding click event to area (image map)

2008-01-28 Thread Benjamin Sterling
Hey Guys, Not entirely sure what this is not working but have the following code: js: $('.optSelectMe').click(function(){ $('.noShowing').addClass('noNakedEye').removeClass('noShowing'); $('#'+$(this).attr('meta')).addClass('noShowing').removeClass('noNakedEye').highlightFade(

[jQuery] binding click event using .each()

2008-01-03 Thread Scottatron
I'm having some trouble understanding if I am using .each() to correctly bind a function to the click event of multiple links. I have a photo gallery consisting of a handful of images enclosed the a div and some controls: ... ... Delete I am trying to create an AJAX delete function

[jQuery] Binding "this" inside anonymous functions

2007-12-17 Thread Joel Stein
Hey, jQuery community. I've used MooTools for about a year now, and am experimenting with jQuery to see if I want to convert or not. So far it's great, and I especially enjoy how easy it is to "find things." Here's my first question, though, where MooTools offers a solution that I haven't found

[jQuery] Binding functions referenced by an array

2007-10-20 Thread Jarodium
Hello I'm having some troubles regarding binding functions referenced by an Array: I have this piece of code function f1() { alert("dklfsd"); } function Dialog(title) { this._dlg_btns_fns = new Array("f1"); } Dialogo.prototype.setButtons = function (val) { var tp = valor.split("@"

[jQuery] binding dynamically inserted DOM elements

2007-10-18 Thread schmingle
i have a piece of code that inserts new objects into the DOM. these objects are of the same class as other objects already in the DOM to which jquery has bound. how do i get these new objects to bind the same as the existing ones? in other words... let's say i have this: $('.foo').click(functi

[jQuery] Binding bug ?

2007-10-12 Thread Flesler
I lost a couple of hours of my life wondering why would this happen, I was working on jQuery.Listen, and after binding, unbinding, and rebinding, the handler was being triggered twice. I finally came up with a case where that happens, only using jquery's binding methods: $('#foo') .click(

[jQuery] binding events and keep reference to the "this" object

2007-09-07 Thread [EMAIL PROTECTED]
I'm not sure if I've completely missed this in the docs, but I'm wondering if there is an easier way of achieving the following: $(".button").bind("click", {that:this}, function(event) { var that = event.data.that; that.handleEvent(); return false; }); I could do the same th

[jQuery] Binding a Click Event to Anchor Tag

2007-08-30 Thread Giant Jam Sandwich
I used to be able to do this: $("a").click(function(){ alert("test"); return false; }); test It no longer works in Firefox. I read some other posts that seem to be discussing the same thing, but nothing definitive. Bind does not work either. However, if I change click to mouseover, then i

[jQuery] Binding events to elements created by a plugin, from within the plugin.

2007-07-16 Thread jason
I am moving some code into a plugin and am stuck on something that is probably very simple. My plugin creates new DOM nodes, but once they are created I need to bind events to them. I'm not seeing an obvious way to do the binding from within the plugin itself. I'd like to just do this: $('foo').

[jQuery] Binding problems (click/submit)

2007-07-09 Thread Bruce MacKay
Hello folks, I'm having difficulty rebinding both a form submit and a click function upon return of an ajax call. The onload code is ... $(document).ready(function() { $("a.gao").bind("click", function() {getAllOptions()}); var options = {dataType: 'html', before: beforeAjax,after: af

[jQuery] Binding actions after an ajax call?

2007-06-30 Thread Tobias Parent
Hey - I've got content being loaded via $('#myDivID div.itemContent').load('/controller/action/'), and the information being loaded is a list of links, which I'd like to set to trigger a series of ajax calls for related DIV's throughout the page. Can I simply set the callback on the load() t

[jQuery] Re: jQuery binding without chaining events?

2007-06-25 Thread Ganeshji Marwaha
as scott mentioned, i would strongly reading through the article. But, just for fun here is a simple hack that could be useful. $("#elem").unbind("click").bind("click", fnName); this will unbind all the click event handlers from the provided element, then bind ur new click event. this way you c

[jQuery] Re: jQuery binding without chaining events?

2007-06-25 Thread Scott Sauyet
SimonJanes wrote: How do I bind an event handler to an query with $().bind() without chaining the event-- what I want to do is set the event handler only if it wasn't already set for that matching element. I don't want that handler to be called twice (or three, four, etc times) for that event.

[jQuery] jQuery binding without chaining events?

2007-06-25 Thread SimonJanes
Hello JQuery Enthusiasts! I'm working on a web page with some tree code that periodically adds new nodes to the tree. When these new nodes/controls appear, I want to bind their handlers to them. At the moment, I'm doing general selections to grab all the possible controls to bind 'click' or 'db

[jQuery] Binding a click event

2007-05-20 Thread MikeR
Just a quick question =). I want to bind an event handler to "body" so that whenever someone clicks anywhere on the body, a DIV disappears. However, there is a specific graphic (that has an id) that I need to be ignored in that click handler. I haven't been able to come up with an elegant solutio

[jQuery] binding to two events (resize and onload)

2007-05-15 Thread willwade
Hi there I have a wacky fix to the age old problem of fluid column widths (a table would do of course). It involves using jquery to calculate the sizes of my columns - the splitter code is a bit over the top for my needs. So I have some simple code but I can't seem to get it to work. $(do

[jQuery] binding problem with content added after the document ready

2007-04-23 Thread willy
Hi, I have probleme binding generated content with the events I binded on load: my dom il like that my nodeName In my app, a html / js tree, I can create node adding in the existing li node: ma new node name but then I want to bind it to the same event I binded the li node with $(docume