Find the last element in a div
Hello, I am new to JQuery. This is my first post. I have a div, with a number of nested divs. I want to append a new div after the last div. For example: <div id="container"> <div class="row">Some thing here</div > <div class="row">Some thing here</div> <div class="row">Some thing here</div> </div> And I want to append a div after the last <div class="row">, so my string to append is '<div class="row">New Row</div>'. How to find the last element and append to it? I don't know if I am missing something
json dataType and mimetype:text/javascript returns a string enclosed in a <pre> block </pre> ?
Hi everyone, What should be the cause of having xhr.responseText enclosed in a "pre" element ? I'm trying to use the jquery.form plugin with some modifications for previewing a file content asynchronously, using the following code: $(document).ready(function() { // Send the form data to the server // and evaluate the JSON response-type. var xhrArgs = { dataType: 'json', success: function(data) { alert("data: " + data); }, error: function(ex)
[jQuery] Documention Group
Hey folks, Hope you don't mind, but with the recent dicussion of documentation for jQuery I've created a seperate group for it: http://groups.google.com/group/jquery-docs/ If you are serious about helping the efforts of improving the jQuery documentation, then please join the group and we can get the dicussion going. This should allow us to keep it off the main list, and keep it in an organised place. Discussions should be along the lines of what we can do to improve the documentation, how we should
$('#$myid').remove();
Hi, <div id="$myid"/> $('#$myid').remove(); This is not working! Why? Regards, Vitaliy
move (clone/remove?) an option from a select to a select on-click?
Ran into the need to be able to move a select option, onclick, to another select option, just wondering if the clone function was my best bet, and how to go about referencing the option... I hate forms :D TIA Dan
Using a $.post to submit all fields within a certain area (divs?)
I want to do a partial submit using Ajax on a page that has a global submit. The global submit works with a form wrapping the entire page and a global submit button at the bottom. This is fine, but I also want a more granular submit functionality, such that there are Save buttons that a user can hit within a certain area to only save that area's data. I want to implement this using $.post. This can be done easily by explicitly writing each and every form element name and grabbing it by it's id to
.css('background-color').
Hi, just wondering if there are plans for jquery to have I.E. 7 and Firefox both return the color: ("yellow") as the return value for css('background-color'). Currently, it looks Firefox returns "rgb(255,255,0)" and I.E. 7.05 returns "yellow" Thanks,Steve
Dev IRC Channel
Hey Guys - A little while ago I set up a jQuery Dev IRC channel, which can be found here: irc.freenode.net #jquery-dev I'm in it all the time, and if anyone is interested in coming in, we can babble about random bugs, looking for feedback. Hope to see you there! --John
selector question
Hi. There's a form that has a bunch of options (say, 30) selectable by checkboxes or true-false radiobuttons (depending on whether it's on a legacy or current system). Let's further say I want to build some jquery to select all these options. There are other checkboxes/ radiobuttons on this form, so I need to narrow it a bit. Each item in question has an id starting with cbOption. The following logic works for checkboxes (I'm skipping some bookmarklet wrapper): $('input:checkbox').each( function()
[jQuery] Jquery incompatible with other script
<p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi</span> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> </span> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><span style="mso-tab-count: 1"> </span></span><span lang="EN-GB" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; mso-ansi-language: EN-GB"> I'm trying to use a javascript code from
[jQuery] Interface plugin site's bandwidth limit exceeded
<div>Interface plugin friends, Just in case you guys didn't know, your site says that you have exceeded your bandwidth limit.</div> <div> </div> <div>-GTG</div>
[jQuery] Moving Plugins to new repository
I'm not sure how many folks have noticed, but an excellent new plugin repository was activated with little fanfare a few weeks ago at <a href="http://jquery.com/plugins" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://jquery.com/plugins</a>. At the moment, we've had a plugin list at <a href="http://docs.jquery.com/Plugins" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://docs.jquery.com/Plugins</a>, which is where the main plugin link points
Microformat Perl Module
Hi Dave! I saw an old post by you that talked about a Microformat Perl Module - what's the status of that? I'd love to be able to use it, if at all possible. Thanks! --John
[Dev] fx Module and inline styles
I don't have much time right now (it has been crazy busy as of late) but I was looking through the tracker and noticed that a few bugs have been logged about the changes to the fx module in 1.0.4 to remove the inline styles for a 'show' or 'hide' operation. http://jquery.com/dev/bugs/bug/742/ http://jquery.com/dev/bugs/bug/744/ The proper way to handle this is to remove the inline styles but it seems many are stuck on keeping them in there. I need to know everyones take/opinions on this issue. --
problem with 'find'
I've been trying to chase down a problem with one of my unit tests. The issue is that evalScripts is executing and appears to find a script tag where none exists. Looking further, it seems that 'find' never returns a jQuery object of size 0. For cases like the one I was testing, where no match exists, find returns a jQuery object like this: [undefined]. That is, it has a size of 1 but element 0 is undefined. Things work fine in 1.0.4, but in the current SVN code the following happens: // alerts 1
Speed Improvements in SVN
Hi Everyone - I've finished up the speed improvements and have committed them to SVN. They work correctly against the test suite, so they seem to be OK. There's still a lot of room for improvement. Speeds in IE are better, but still not very good. However, in Firefox, we're totally crushing everyone else. You can see the difference for yourself: jQuery Old vs. jQuery New Speed Test Suite: http://john.jquery.com/speed/ Test Suite: http://john.jquery.com/test/test/ I also took this opportunity to fix
Synchonous requests failing, possible fix may introducde more memory leaks
Hi devs, when I added the async option to $.ajax at first, my tests for sync requests failed. I figured that it was due to my badly written tests, but now found the real issue: At the end of the readystatechange event handler, the xml reference is set to null, according to the comment above it, to prevent memory leaks. What happens on sync requests: The xml is set to null, and null is returned, instead of the XMLHttpRequest object. While the normal handling via callback may work, the example as posted
Shutdown of this list
Hi, as this list was only meant to provide a temporary list till we have an official dev list, I'm going to shut down this list soon. Please switch to dev@jquery.com - http://jquery.com/mailman/listinfo/dev_jquery.com -- Jörn Zaefferer http://bassistance.de _______________________________________________ Jquery-dev mailing list Jquery-dev@bassistance.de http://lists.bassistance.de/mailman/listinfo/jquery-dev
Spam "Filter"
Hi Everyone - I've thrown a custom SPAM filter on Trac that checks to see if the user is using JavaScript, or not. This should stop automated bots from posting new tickets or comments. This isn't a perfect solution, but it'll hold us over for now. Unfortunately, I couldn't just upgrade straight to 0.10/0.11 due to the fact that our install has been incredibly customized/hacked upon. If I can just keep the spam at bay, this should suit our needs, I suspect. --John
Question about 'param' method
// Serialize an array of form elements or a set of // key/values into a query string param: function(a) { var s = []; // If an array was passed in, assume that it is an array // of form elements if ( a.constructor == Array || a.jquery ) { // Serialize the form elements for ( var i = 0; i < a.length; i++ ) s.push( a[i].name + "=" + encodeURIComponent( a[i].value ) ); // Otherwise, assume that it's an object of key/value pairs } else { // Serialize the key/values for ( var j in a ) { // If the value
Massive Speed Improvements
Hey Everyone - I've got a nice surprise to go with the upcoming 1.1 release (I'm currently shooting for a Jan 14th release with an alpha release early Jan - let me know how that sounds for everyone). These past two days I've been working on drastically increasing the speed of the selector capabilities of jQuery. I've achieved speed increases across the board - ranging from 400-1000%. The result is a library that is completely faster than Prototype, and mostly faster than cssQuery. Yehuda has been
RE: [Jquery-dev] Massive Speed Improvements
Woo hoo, this sounds great! After doing some recent exploration in the area of find/filter I was going to suggest some work in that area. The new benchmarking framework makes it a lot easier to focus on the bottlenecks. I will have some time next week because I'm off work, so if you need help squashing bugs on anything let me know. I'm also very good at creating bugs if you need that. :) -----Original Message----- From: jquery-dev-bounces@bassistance.de [mailto:jquery-dev-bounces@bassistance.de]
RE: [Jquery-dev] Question about 'param' method
> If a form has a lot of checkboxes with name="selectedVal[]"
[jQuery-dev] Bug #136 Safari Keypress
I finally found some time to go through the current bugs and would like some feedback on bug 136 (and possibly 379). 136 is caused by Safari firing both the keyDown and keyUp events when the keyPress event is used. We could solve this by mapping keyPress to keyDown for Safari ... however, this seems like a bad idea for maintenance reasons (the same reason I closed 379 as wontfix). I believe it might be better to document these two issues and their simple workarounds rather than trying to add hackish
RE: [Jquery-dev] Add JSON serializer to core?
John posted it somewhere but I've attached the one I use. -----Original Message----- From: jquery-dev-bounces@bassistance.de [mailto:jquery-dev-bounces@bassistance.de] On Behalf Of Jörn Zaefferer Sent: Tuesday, December 19, 2006 5:10 PM To: jquery-dev@bassistance.de Subject: Re: [Jquery-dev] Add JSON serializer to core? Dave Methvin schrieb:
RE: [Jquery-dev] Add JSON serializer to core?
That $.box code isn't totally bulletproof. For example, it doesn't escape newlines or quotes in strings. I'm using John's $.json at the moment but it would be handy to have a serializer without a separate plugin. I think this would make more sense in the forms plugin, since that would inevitably be where it's used. Of course, I could also make the case for moving the forms plugin to the core to sweeten the ajax support, I use it on almost every page. -----Original Message----- From: jquery-dev-bounces@bassistance.de
Add JSON serializer to core?
Hi devs, I just noticed this neat little code: http://jquery.com/docs/Plugins/box/ I wonder if this is a good oppurtunity to add JSON serializer support to jQuery core. It's very useful for anyone working with AJA(X|JSON). And as mentioned on the wiki page, the code provided at json.org is not pretty very pretty. If the JSON serializer can be convientently integrated into some of the existing ajax methods, it would make jQuery even a bit more sexier. I haven't looked at the code in detail nor did
RE: [jQuery-dev] Curious about Dave's Optimizations...
I committed these fixes, let me know if you have any problems with them, especially Safari since I couldn't test it. I added test cases for some of the new id searches. I wasn't sure how to add test cases for the tbody fix but I did a few tests here on a scratch page. There are still ways to fool the jQuery.clean code with HTML table scraps in IE, but a bulletproof solution was going to be longer and slower. -----Original Message----- From: Dave Methvin [mailto:dave.methvin@gmail.com] Sent: Monday,
RE: [Jquery-dev] #511 context functions
> I just commited the fix for #511 (http://jquery.com/dev/bugs/bug/511/).
#511 context functions
Hi folks, I just commited the fix for #511 (http://jquery.com/dev/bugs/bug/511/). While the fix is fine, I wonder about the future of those context functions. There are two obvious possibilites: - Remove - Test and document I haven't used them as they were undocumented, and therefore never documented them..... I know that John uses them a lot, though I'm not sure if that is true for every of them or only special ones. Eg. the constructor one: $("selector", function) against $("selector").each(function)
RE: [jQuery-dev] Curious about Dave's Optimizations...
I have changes related to these tickets but need to clean up the test cases. I'll get my butt moving on it tonight. jQuery.merge speedup http://jquery.com/dev/bugs/bug/444/ This exits the inner loop if it finds a duplicate, saving some time when there are dups. The first comment by henrah in the bug was correct, I hadn't thought about that case. <tbody> duplicated http://jquery.com/dev/bugs/bug/418/ I shortened domManip a lot but ended up having to pay most of it back to fix jQuery.clean. query for
Safari event problems
Hi once more, there are two issues open related to events in Safari: http://jquery.com/dev/bugs/bug/136/ http://jquery.com/dev/bugs/bug/379/ I don't have access to an appropiate enviroment to develop and debug for Safari, therefore it would be great if someone else could pick up the issue. -- Jörn Zaefferer http://bassistance.de _______________________________________________ Jquery-dev mailing list Jquery-dev@bassistance.de http://lists.bassistance.de/mailman/listinfo/jquery-dev
id with context selectors
Hi devs, related to #267 (http://jquery.com/dev/bugs/bug/267/): I think Dave had implemented a small and effective fix for anyone insisting to use the id selector with selector context (eg. div#id). What is the status of that? If you don't find the time for proper testing, post the files here. -- Jörn Zaefferer http://bassistance.de _______________________________________________ Jquery-dev mailing list Jquery-dev@bassistance.de http://lists.bassistance.de/mailman/listinfo/jquery-dev
[jQuery-dev] Curious about Dave's Optimizations...
Dave, I believe you had some optimizations to various parts of the jQuery core. I think I remember I was going to test them in Safari but we couldn't get synced up on them. Have they been committed to the core yet? Do they still need more testing? I would hate to see them get lost. -- Brandon Aaron _______________________________________________ Jquery-dev mailing list Jquery-dev@bassistance.de http://lists.bassistance.de/mailman/listinfo/jquery-dev
Early alpha: the new draggables!
Hi folks, it took some days, but here is a first result of the improved Draggables and Droppables. Stefan and me have done a lot of conception on the right way to improve performance on Drag & Drop, and the result was a completely new way of detecting droppables, a complete rewrite of Stefan's library, which I did in the last days (luckily [at least for this project] I was sick, so I spend the last days at home..) Some features need dimensions.js (wrapHelper, iframeFix and scroll). If it's not loaded,
Mediawiki docs: Post code snippets?
I just tried to post a code snippet (html and js) into the wiki at docs.jquery.com. But I can't figure out how to prevent the html markup being rendered. Any hints? See http://docs.jquery.com/Cookbook/Navigation when someone whants to try editing. -- Jörn Zaefferer http://bassistance.de _______________________________________________ Jquery-dev mailing list Jquery-dev@bassistance.de http://lists.bassistance.de/mailman/listinfo/jquery-dev
CMS option for jQuery.org
Hey guys, I've been a little quiet the past few days as I have been busy learning CakePHP, and because of this I wanted to bring this up in discussion. The option I am presenting is either: - go with Drupal as the CMS on jQuery.org Or - I am currently building my own custom CMS called HalfBaked (as my company is No Half Measures, and it's CakePHP :). It's intended for my work, as I need a lot of customistion on the sites I am working with, but as I am building it in seperate plugin modules for the
$.load()
Is there any reason not to refactor 'load' to be invoked with an options object the same way that 'ajax' is? I would really like to be able to invoke load and pass in an options object that gets passed along to the ajax method and subsequently to ajaxSend, ajaxComplete, etc. Currently this is not supported but I think it makes a lot of sense. I think the same should apply to $.get and $.post as well. Any thoughts on this? _______________________________________________ Jquery-dev mailing list Jquery-dev@bassistance.de
RE: [Jquery-dev] $.load()
I like the idea that there is a simple-argument way to do things (.get/.post/.load) and a full-featured version (.ajax). At this point I don't think the simple versions can be enhanced (in a backward compatible way) without creating a lot more parameter hockey. If anything, the problem with .load is that it tries to allow too many argument permutations already, in addition to its off-label duty as a binder for window.onload. Notice that although you can omit the params and specify a callback as the
RE: [Jquery-dev] $.load()
>> When the status comes back notmodified it doesn't provide the text, right?
Next Page