[jQuery] Setting attribute nodes with boolean?
Hi all, I want to enable an input element if a form was entered correctly. That does not work: $("#input[@type='submit']").set("disabled", "false"); For these cases there should be the possibility, to pass a boolean (this is what the DOM expects): $("#input[@type='submit']").set("disabled", false); By now, one can do this instead: $("#input[@type='submit']").get(0).removeAttribute("disabled"); That's not too bad, just asking. Regards, Klaus _______________________________________________ jQuery mailing
[jQuery] JSON result?
Is it possible to get a json response instead of xml? -matt _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] AJAX - Force XML Parsing
Hello, I've been using the AJAX module for Jquery... pretty awesome. However, I can't access XML data locally due to $.get's method of resolving what data to get. $.httpData seems to be the problem I fixed it to a shorter version: $.httpData = function(r) { return r.responseXML || r.responseText; } Another fix that might be useful is an option is to have a way to permit overriding the mime Type.. or at least override it to be XML so that XML parsing will be done. -- Thomas Harning Jr. Fortune:
[jQuery] possible .slideup/.slidedown bug
I've noticed that if i click a link that slides open or closes a div more then once before it is completely open or closed, (like if click the link twice in a row very quickly) a bug seems to occur. The div seems to become smaller in height, at first by around 1/2, but then more and more (if you keep quickly double clicking) untill eventually it is just a couple pixels tall. It seems that the div shrinks more when you do this upon the slideup action. you can see an example of this <a href="http://keepitrad.com/dick/icof/test.html">http://keepitrad.com/dick/icof/test.html</a>
[jQuery] A little html page to help learn people querying DOM with jquery
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 11 (filtered medium)"> <style> <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;}
[jQuery] Looking for some examples
I recently stumbled upon JQuery and was instantly addicted to its concise notation, chainable methods and immense flexibility. Great job, John. Some questions, if you dont mind. 1. Do you have any examples of dynamic tooltips or in general, loading dynamic DIVs into a page? 2. Do you have any examples of drag-and-drop, sortable lists and that sort of thing? Thanks. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
[jQuery] Traversing up the DOM
I see that the basic module has a "find" method that traverses down the DOM until it finds the specified element. 1. Is there a method that traverses *up* the DOM? If I have a TD node, I would like to traverse UP the DOM (using parentNode) until I find the Nth specified TABLE node. 2. What happens if the "find" method is unable to find any matches? What does it return and how does it affect the rest of the methods chained to it? Thanks __________________________________________________ Do You Yahoo!?
[jQuery] JQuery in my First Commercial App.
Hi All, This is basically a big thank you (again) to John for the wonderful JQuery. I've just implemented some JQuery AJAX into my start-up's website, tunecast.co.uk. The inclusion is nothing major from a technical point of view, but replaces, the "behaviour, prototype and AHAH" scripts there before, thus saving me about 150k... :) and making the code cleaner and easier to modify. Only took 30 mins as well... www.tunecast.co.uk/music.aspx All feedback welcome (good or bad!!!) best Mark. -- Mark Panay
[jQuery] using jquery for ajaxian upload progressbar with php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD> <BODY> <DIV dir=ltr align=left><SPAN class=270455713-14032006><FONT face=Arial color=#0000ff size=2>Hi constantin. </FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN class=270455713-14032006><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV dir=ltr align=left><SPAN class=270455713-14032006></SPAN><FONT
[jQuery] using jquery for ajaxian upload progressbar with php
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=878194016-09032006><FONT face=Arial size=2>Hi !</FONT></SPAN></DIV> <DIV><SPAN class=878194016-09032006><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=878194016-09032006><FONT face=Arial size=2>I attack again with some doubts... :)</FONT></SPAN></DIV> <DIV><SPAN
Email Influx
Hello everyone, Sorry for the massive influx of email to the mailing list, I just went back through the posts that had been accidentally rejected from the mailing list (it's getting a lot of spam now, so I have to be pretty strict about what I let in). There's a good two dozen emails in my inbox, about jQuery, just waiting for me to tackle; which I plan on wading through tomorrow (I just submitted the first chapter of my JS book, so that's freed me up a little bit). Thanks for your patience everyone!
[jQuery] How to serialize entire form?
Is there a way to serialize a form for posting or even "load"ing? Thanks! Matt _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Bug in selector syntax (recursive?)
Hi, I happened to hit the wrong key and made Safari nuts. I've pasted the code below. Notice the: "#buttons[button" part. If I replace the "[" with a "/" or a ">", all is fine. But the "[" really causes some problems. I realize that it's not the correct character, but it'd be nice to have it not freeze up. Just found JQuery today. Really nice work. There were things about Prototype that really bothered me while really loving it's ease of use. Go JQuery!!!! Matt <!DOCTYPE html PUBLIC "-//W3C//DTD
[jQuery] Recent breakage in $().append()
I'm really enjoying JQuery, though it's a bit of a challenge programming to a moving target with all this innovation going on! :-) The code in .append() used to read: for ( var i in a ) if ( a[i].cloneNode ) this.appendChild( a[i].cloneNode(true) ); Now with the recent cloneNode change it reads: for ( var i in a ) this.appendChild( clone ? a[i].cloneNode(true) : a[i] ); I add some methods to the Array object. In the older version the check for a cloneNode method prevented these methods from being
[jQuery] Running AJAX-plugin demo page with Internet Explorer.
Hello, First of all a big thank you to John for the incredible work on jQuery! Now to my problem, I am trying to running the AJAX-Plugin demo page (http://jquery.com/demo/ajax/) with IE version 6.0.2900 xp service pack 2. The problem seems to be using following functions. $.get("ajax-test.xml",function(xml){ var text = $("title",xml).text(); $("div#xml").html("<h1>"+text+"</h1>"); }); And $.post("xml.cgi",{ name: "John" },function(xml){ var text = $("title",xml).text(); $("div#dxml").html("<h2>"+text+"</h2>");
[jQuery] element attributes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>Message</TITLE> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD> <BODY> <DIV dir=ltr align=left><FONT face=Verdana size=2><SPAN class=953373816-13032006>Craig, the return value from a $() call is not a DOM node (HTML element) itself. It is a jQuery object which may contain references to one or more DOM nodes. Your getElementById version
[jQuery] element attributes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <TITLE>Message</TITLE> <META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=265524716-13032006><FONT face=Georgia color=#008000 size=2>I tried using the .get(0) which I saw was returning the object, but for some reason adding .world to the it escaped me. I should have thought of that, it makes sense. </FONT></SPAN></DIV>
[jQuery] element attributes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>Message</TITLE> <META http-equiv=Content-Type content="text/html; charset=iso-8859-1"> <META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD> <BODY> <DIV dir=ltr align=left><SPAN class=837364216-13032006><FONT face=Arial color=#0000ff size=2>Hi Craig,</FONT></SPAN></DIV> <DIV dir=ltr align=left><SPAN class=837364216-13032006><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV dir=ltr align=left><SPAN
[jQuery] element attributes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <TITLE>Message</TITLE> <META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000 size=2>This is probably a simple question, but I'm having problems finding the answer...</FONT></SPAN></DIV> <DIV><SPAN class=250391916-13032006><FONT face=Georgia color=#008000 size=2></FONT></SPAN> </DIV>
[jQuery] AJAX module: abort certain requests (as a plugin?)
Hi there, currently I am missing the possibility to abort certain requests send by XMLHttpRequest. I am for example working on a Google Map application in which the overlay is updated every time a user zooms or moves the map. The data is retrieved via XMLHttpRequest and triggers an expensive search on the server. Imagine that if a user wildly clicks the zoom controls then there are send a lot requests but of these requests only the last one is interesting, so i want to abort the former ones to save
[jQuery] undefined ret[0] error
Im not sure whats causing it, but on my blogging script i am writing with jQuery, i get this error message, seemingly at random times... <blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"> Warning: reference to undefined property ret[0] Source File: <app folder>/jQuery.js Line: 477 </blockquote> The error is happening: <blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left:
[jQuery] Binding events to newly added DOM elements
> From: John Resig
[jQuery] Binding events to newly added DOM elements
> From: John Resig
[jQuery] show method and opacity
In my script i'm using show() method without parameters. This is my code and the css : function mybox( sHtml ) { $(document.body).append("<div id='overlay'> </div><div id='lightbox' class='lightbox'> </div>") var close_mybox = function(){$("#lightbox").remove();$("#overlay").remove(); return false;} $("#lightbox").html(sHtml).show(); $("#overlay").show(); $("#overlay").click( close_mybox ); $("#lightbox a").click( close_mybox ); } .lightbox { color: #333; display: none; position:
[jQuery] Binding events to newly added DOM elements
I'm seeing some odd behavior with event binding (IE6, IE7b2, FF1.5). Given the following HTML: <input id="bindTest" type="button" value="Bind" onclick="bindTest()" /> This method does not bind the click event for a newly created button: function bindTest() { var el = document.createElement("input"); $(el).set("id", "testButton").set("value", "Test Button").set("type", "button"); $("#bindTest").after(el); $(el).click(function() { alert("button clicked"); }); } but this method does: function bindTest()
[jQuery] jquery.js and prototype.js incompatibility
Hi, out of historcal reasons i use prototype.js and jquery.js together in several pages. I just found a problem with event-handling: in the appended code the selectbox is empty after selecting a value. I believe the problem is with function handleEvent where the second loop for (var i in handlers) { ... } loops over several properties - including "clear" which obviously clears my select box. For me changing the loop to for (var i=0; i<handlers.length; i++) { ... works fine, but maybe there is a better
[jQuery] Issue: slideDown & height:auto
John,
[jQuery] JQuery for designers Part 2 - Tutorial
Just posting the second part of my JQuery tutorial. This isn't meant for all of you JS gurus, more for the designers and codaphobics... http://www.markpanay.com/2006/03/jquery-for-web-designers-part-2.html cheers Mark -- Mark Panay www.markpanay.com Jargon Free Web Development _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] (no subject)
<div><a href="http://encytemedia.com/blog/articles/2006/03/07/prototype-gets-some-serious-syntactic-sugar">http://encytemedia.com/blog/articles/2006/03/07/prototype-gets-some-serious-syntactic-sugar</a></div> <div> </div> <div>looks like prototype is moving forward to chainable methods too</div> <div> </div> <div>Armand</div> <div> </div> _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
[jQuery] Binding events to newly added DOM elements
I like your version better. It's probably faster too. While playing with this code, I noticed that this.size() goes to more work than it needs to. Even if you want to document size() as the proper external interface, it seems that internal methods could use this.cur.length without violating any design principles. Or at least change size() to this (or do both): size: function() { return this.cur.length; }, What the heck, while I'm at it I would change each() from: each: function(f) { for ( var i =
[jQuery] Binding events to newly added DOM elements
> From: John Resig
[jQuery] Binding events to newly added DOM elements
That almost sounds a little too automagical, but I don't have any better ideas off the top of my head. I guess you're thinking something along these lines (using append() as an example)? append: function() { var cloner = this.cloner(); var a = $.clean(arguments); return this.each(function(){ for ( var i in a ) this.appendChild( cloner( a[i] ) ); }); }, cloner: function() { return( this.cur.length ? function( node ) { return node.cloneNode ? node.cloneNode(true) : node; } : function( node ) { return
[jQuery] Binding events to newly added DOM elements
That would work, but I believe it would result in a memory leak in IE: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/d nwebgen/ie_leak_patterns.asp See the "DOM Insertion Order Leak Model" near the end of the article.
[jQuery] Binding events to newly added DOM elements
BTW, Mike, you ought to go get my DOM creation plugin: http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype Instead of this:
[jQuery] Binding events to newly added DOM elements
Mike, what you're seeing happens because the $().after() method clones the node you pass it instead of inserting the node itself. You can see this in the code for after(): after: function() { var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.parentNode.insertBefore( a[i].cloneNode(true), this.nextSibling ); }); }, All of the related methods such as $().append() do this as well. John, I've been meaning to ask you about this myself. I believe the
[jQuery] attribute selectors using like statement?
<div>HI </div> <div> </div> <div>Just found this library and its working nicely and have been playing with a few things allready. But is the following allready possible </div> <div> </div> <div>just say i have a href="this.pdf" and a href="this.doc"</div> <div> </div> <div>Is there a function allready where I can search for the attribute href but not with a predefined value as i see in the examples but with a like statement or with and endofstring?</div> <div> </div> <div>thanks</div> <div> </div>
[jQuery] multidimensional arrays with the ajax plugin
Hi! Trying too hook up a form in PHP CMS system with the new AJAX functions. The array look something like this: Array ( [edit] => Array ( [subject] => subject [name] => Steve [email] => steve@example.com [body] => the body ) [op] => Send email ) Is it possible to pass multidimensional arrays with the $.post function? Regards, Anders PS. Is it intentional to show the emailadress of the sender in the archives? Spam and all... DS. _______________________________________________ jQuery mailing list
[jQuery] Selecting next sibling
Hi there, is there an easy way in jQuery to simply select the next sibling? What I want to do is to toggle the succeeding if I click on a <h3>: Thinking in jQuery, the following snippet is not the way to go I guess :-) : $("#register-faq h3").click(function() { var next = this.nextSibling; while(next.nodeName.toLowerCase() != "p") { next = next.nextSibling; } $(next).toggle(); }); I read about some more helper methods like .ancestor() and .siblings() in the blog, but didn't find any documentation
[jQuery] AJAX with post: how to build name value pair as in a post request submitted by form?
Hi there, how can I transmit a post request with the AJAX module that looks exactly like a post request submitted by a form? If my field looks like this: <input type="text" name="foo" value="bar" /> the request send via XMLHttpRequest should look like: foo=bar The following fails because of an invalid property id: $("input[@type='text']").blur(function() { query = { this.name: this.value }; $("em", this.parentNode).load("some_url", query); } and I don't want to do this: $("input[@type='text']").blur(function()
[jQuery] AJAX plugin does not work in IE6
The Windows old-timer steps into the room... Strictly speaking, ProgIDs and CLSIDs don't refer to "versions" of an interface. COM (ActiveX) interfaces don't have versions. Each COM interface is a unique entity all of its own, and once you publish an interface you don't change it. You can always add new interfaces to your COM object (DLL or EXE), and it's customary to name these as if they were new versions of your old interfaces, but each one stands alone and you always continue to support all of
Next Page