[jQuery] Color Label on Form Validation Error
Not sure if I'm just missing this or what, but I'm using Jörn's wonderful form validation plug-in and can't seem to find how to add an error class to the label next to the input field that didn't validate. Please don't mistake this as a question about the error messaging, as that's working just fine. But I also want to add that same error class to the label of the failed input. Any thoughts?
[jQuery] Trouble with calendar icon and datePicker v2
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=337141222-21052007><FONT face=Arial size=2>Hello,</FONT></SPAN></DIV><SPAN class=337141222-21052007> <DIV><BR><FONT face=Arial><FONT size=2>Why doesn't $('#date').datePicker();<SPAN class=337141222-21052007> cause the calendar icon to appear anymore? Only thing I'm seeing
[jQuery] Question about the context attribute of a jQuery call
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.6000.16441" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=286485717-23052007><FONT face=Arial size=2>Assume I have two form elements, both of which are identical in every way (contents and all) except for their IDs. One named redlineSelect, and the other named inventorySelect.</FONT></SPAN></DIV> <DIV><SPAN class=286485717-23052007><FONT
[jQuery] NEWS: jQuery-Powered FeedBurner to be Acquired for $100M
Congrats to the FeedBurner team: http://www.techcrunch.com/2007/05/23/100-million-payday-for-feedburner-this-deal-is-confirmed/ Rey -- BrightLight Development, LLC. 954-775-1111 (o) 954-600-2726 (c) rey@iambright.com http://www.iambright.com
[jQuery] Ajax Problem?
I write this simple code. I check it by using firefox and firebug and firebug gives me that the request is successful. But I don't see the box "ok!"??? So what is the problem? $.ajax({ type: "GET", url: "feed.xml", dataType: "json", success: function(msg){ alert("ok!"); } }); I try another way. $.getJSON("feed.xml", function(json){ alert("ok!'); }); and there is the same problem. So how can I solve it? Here is the complete file: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
[jQuery] Dispatch events into dynamically loaded content
Hello everybody and my apologies for my poor english but I'm a french speaker. I want to dispatch a "load" event on a link in a "loaded" content. Explanation : <div> <a href="someStuffToLoad.php" class="doMyLoad">First and original link</a> </div> $('.doMyLoad').click( function () { $(this).parent().load( $(this).attr('href') ); } ) then my content look like <div> <a href="someStuffToLoad.php" class="doMyLoad">My second link</a> </div> I'd like that the "My second link" can dispatch the click event
[jQuery] Boolean value for if an element exists
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.6000.16441" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=706112417-23052007><FONT face=Arial size=2>I've got some multiple dropdowns that I'm trying to conditionalize. Our designers can select one (or both) of two sets of code. I'd like to conditionalize my jQuery code so that if the redline dropdowns exist, I can run that code,
[jQuery] Hacker wants to format Ajax Data elegantly
Background: My usual server-side languages are ASP (not .NET) and MS SQL... I've manually constructed JSON strings server-side. Worth the effort because JavaScript picks them apart naturally, no special library required. In the other direction, I've relied on hacks. Usually CSV or semicolon delimited strings. Maybe there's a better way? Thought I'd ask... Sam PS: I've had a problem in the past which went like this: Form data, captured server-side (my pre-JavaScript days) would very occasionally (1
[jQuery] rounded-corners in images (photos) ?
Hi, Anybody know a good way in jQuery to round the corners of photo images? thanks for any pointers, paul w
[jQuery] Conventional JS/DOM to jQuery conversion help
I am new to jQuery and have several questions: 1. To access a form element, I use: document.forms[frmname] [elementname] What is the jQuery equivalent? Will there be any significant speed difference between the old and jQuery way? 2. This is basically the same as #1. I am getting the hang of accessing elements by id using $("#elementid"), but how do I access form elements by name so I can avoid using ids. 3. I want to strip error messages after an input element -- essentially just stripping DOM siblings
[jQuery] problem with ajax
Hey everyone, I'm trying to use the jQuery.ajax function, to fetch a webpage on which I would like to run some jQuery on that page. The problem that I am running into is that dataType field. I am setting it to xml, but ajax keeps returning text. Here is the code: XML_page = jQuery.ajax({ //get the whole page via ajax url: "", data: 'q='+mucie_get_q(), async: false, dataType: "xml", }); XML_page.responseXML will be equal to null, but .responseText will contain the document. I've also tried converting
[jQuery] Switching params in $.post()
Hello! I'm trying to use $.post, in order to send along parameters via POST. I have figured out how to do this properly (like: {title: "some item", author: "some author"}, etc.). However, my list if parameters changes based on one variable: "type". So if the type = b, then let's say we'll use the title, author, release_date parameters. But if the type = f, then the parameters might be title, year, actors, etc. How can I make that list of parameters dynamic? All I need to do is fit a switch block
[jQuery] Performance tip
This one's probably blindingly obvious to anyone with any significant programming experience in javascript, but it's an easy one to forget too. Consider this code: function fast () { var myDivItems = $('#myDiv').children(); for (x = 0; x < 1000; x++) { myDivItems.length; } } function slow () { for (x = 0; x < 1000; x++) { $('#myDiv').children().length; } } Both are functionally identical, but try profiling their run times in Firebug! Here's the average
[jQuery] JavaScript XML-RPC Solution?
Anyone know (preferably, actively use) an XML-RPC Library written for JavaScript. I googled it, got a couple of hits, but I'd like to know if anyone has experience with a particular library or has a home grown solution. - jake
[jQuery] IE selector bug/error?
<HTML > <HEAD> <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD> <BODY > <DIV> <TABLE CELLSPACING="0" CELLPADDING="0" BORDER="0"><!-- Letter Heading --> <TBODY> <TR> <TD><!-- Left margin --> </TD> <TD> <DIV><SPAN class=404411114-23052007><FONT face="Trebuchet MS" size=2>I've found something that I can't get around; in IE6, these selectors won't do anything for me;</FONT></SPAN></DIV> <DIV><SPAN class=404411114-23052007><FONT
[jQuery] update check Box
I am trying to update a checkBox... using: jQuery("#HSFCO_1")[0].checked= "true" where <input type='checkBox' class='HSFCO' id='HSFCO_1' checked='false> However... the view is not update! Any suggestion?
[jQuery] cannot unsubscribe to jquery-en google group
I have been trying to unsubscribe to the email feed for this group with no success. I have setup a google groups account with this receiving address. However, although google groups does manage to send me all the posted messages (lots every day), google groups does not successfully send me the account confirmation message although I have asked to have it resent many times. So I am stick in limbo. I must confirm my email address in order to unsubscribe. I have tested this quite thoroughly. I can change
[jQuery] Queueing multiple .show() and .hide()
Things get quirky on a page if .show() and.hide() are running simultaneously on different blocks. I've implemented a callback to queue things up serially. It seems to run a little smoother now. Is there an integrated queueing system in jQuery that will relieve me of the burden of serializing .show and .hide events? Sam
[jQuery] Shortest Selector
<TR> <TD> <A>ONE</A> </TD> </TR> <TR> <TD> <DIV>TWO</DIV> </TD> </TR> What is the shortest Selector to find the DIV if one starts with A (this) This is the best I got, but is there a shorter way? <span style="font-weight: bold;">$(this).parents("tr").next("tr").find("div") </span> Glen
[jQuery] opposite of filter()
Just a quick one, but I couldn't find documentation on how to do this. You can use filter() to include only the elements that match the specified criteria, but is there a way to exclude all elements that match the filter criteria? for example: $('p').filter('.thisClass') would get all the paragraphs that have a class of thisClass, but how would you go about getting all the paragraphs that don't have a class of thisClass?
[jQuery] Slow selector
I am writing a script that scans a list of items that each contain form fields and doing something based on the value of the field in each item. I came up with the following code, which does seem to work as intended, but execution can take upwards of 500ms, which I feel is rather slow. var container = '#myElem'; $(container.children ()).each (function () { thisVal = parseInt ($('[@name="quantity"]', this).attr ('value'), 10); // Do stuff }); Obviously the fields can't have the same ID as
[jQuery] animate broken (e.g. fadeIn(), fadeOut())
I have this code: <div id="teaser" style="display: none;"></div> And this javascript code: function teaserHide() { jQuery('#teaser').fadeOut(1000); } function teaserShow() { jQuery('#teaser').fadeIn(1000); } /** * Initialize page */ jQuery(document).ready(function() { // // Start update function jQuery('#teaser').PeriodicalUpdate({ url: '/framework/teaser', delay: 10000, delayed: false, cbStart: function(jqElem) { teaserShow();
[jQuery] alerting the value of radio button onfocus
that's what im trying to do - when a radio button is clicked, show its value. i have the code below, which i dont think is the best way to go about it. it always alerts "undefined". my reasoning is: when the document has loaded, and an input element in the div with id 'test' is focussed, show an alert of the value of the currently checked radio button. $(function(){ $("#test/input").focus( function() { alert($("input[@type=radio][@checked]").value);}); }); strangely enough when i change "input"
[jQuery] dealing with spam on the jQuery list.
Gmail deals pretty well with spam, but it has to be told! I mark the spam messages as spam. Gmail gets the idea, and the abuser's mail is all marked spam. If enough people using gmail, just mark the spam as spam... every gmail user will have the spam thrown into the spam folder. (I think!) Responding to spam, no matter how funny or ridiculous , just makes things worse.<br clear="all"> -- Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ
[jQuery] Queueing animation effects
I need to be able to do a number of animation effects on a page, but the various classes have to occur one after the other, not all at once. For example: $('.hidden).show ('slow'); $('shown').hide ('slow'); is no good. I tried firing one as a callback to the other, which worked fairly well $('.hidden).show ('slow', function () { $('shown').hide ('slow'); }); but this had a problem, in that if nothing matches .hidden, then the show animation never gets executed. What I need is some kind of animation
[jQuery] jquery.validation and ajax
Hi everybody, sorry for my english and.. sorry for my js code (newbie :-() I have this: $().ready(function() { // validate signup form on keyup and submit $('#form_inserisci_commento').ajaxForm({ target: '#successDiv', // success identifies the function to invoke when the server response // has been received; here we apply a fade-in effect to the new content success: function() { $('#inserisci_commenti').fadeOut('slow'); //$('#loadingDiv').show(); $('#successDiv').fadeIn('slow'); } }), $("#form_inserisci_commento").validate({
[jQuery] The best practice to do this
How i make a list in a textarea? My ideia is do a script to when the user press ENTER in ah description textarea, this event create another row list. For my textarea look like some to do list. Thanks for the ideas ;D -- []´s Jean www.suissa.info Ethereal Agency www.etherealagency.com
[jQuery] two doubts: Highlight() and sortables
Hi everybody, I'm Rodrigo from Brazil and I'm new to jQuery (started 2 days ago). I'm pretty happy with what I achieved so far. :) I have two IE problems that are difficult to debug and maybe you had similar experience of what may cause them. First, an example: http://dev.tipos.com.br/jquery/sortables.php On Firefox it seems perfect. On IE: 1. The Highlight() effect triggered right after a new widget ('add widget' link) or columns ('add columns' menu) are added ends with the color set for the effect
[jQuery] ANNOUNCE: SearchHighlight plugin
Hi all, I just released my second jQuery plugin, SearchHighlight, a plugin to highlight searched words in your search result pages. Here are the main features: 1) It works using search engine referrers or explicitly declared words 2) supports multicolor highlight 3) exact and partial matches 4) supports declaring document areas to highlight or to exclude from highlight 5) searches for words with accents or special chars as they were plain ones The plugin is 3.2kb packed. The links English -> http://www.jquery.info/spip.php?article50
[jQuery] Trying to get this to work as expected with images and Sortables
Here is the URL: http://mikehost.com/~mike/tmp/jquery.html I think it's self-explanatory what I am trying to do - basically keep it in two rows. Is this possible? Right now it winds up making 3 rows... has anyone got this to work as expected (where it would stay inside of the 2 rows and adjust as expected) Thanks, mike
[jQuery] Debugging jQuery
over the months, I've re-written my debug library several times. I'm pretty happy with this one. based on code from all over the place! I hope you can all read the attached file.
[jQuery] Problem with thickbox+form+validation
<!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.6000.16441" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>I have one html who call one iframe with ajax content via thinkbox</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>The link in ths html is that:</FONT></DIV> <DIV><FONT face=Arial size=2><a
[jQuery] Do I have to?!
By default, I have set all AJAX requests to syncronous as I like to have the .getJSON functions inline. However, occasionally... I need to send a .getJSON request asynchronously. I understand that this is a wrapper function for the .ajax method. Two solutions that came to mind... Use the ajax function, or set my global ajax settings to asynchronous prior to the request and reset it to synchronous after the request. Neither sounds very pretty. :-) Can I send the AJAX options to .getJSON? Thanks, Jimmy
[jQuery] OT: XML vs JSON
I really like json, and the ability to recognize arrays is great. However, there is strength of xml in that order can be preserved. I can not think of a way to implement this in json. Is it possible and I am simply blind to the truth? XML: <b>Title</b><i>Subtitle</i><b>Author</b> JSON: {"p":{"b":["Title","Author"],"i":"Subtitle"}} ~Sean
[jQuery] OT: Suppress Apache Authentication
Simple problem: I add an image from an external site to the page and sometimes the site is protected by Apache authentication so it pops up a login box. This is really annoying, any ideas on how this can be suppressed. All creative suggestions accepted. ~Sean
[jQuery] Cannot execute javascript after AJAX request on SSL page
Hi there, I am a bit stuck with IE security. I am trying to execute javascript after the AJAX request but this is not working on IE when running site on HTTPS. When site is on http AJAX works just fine. Firefox works fine on both SSL and http. Here is a simple sample that fails on HTTPS but works on HTTP. My loader page: <script src="jquery.js"></script> <script> $(document).ready(function(){ $("a#loaderLnk").each(function(intIndex){ $(this).click(function(){ $("#resultsToLoad").load("foo.html").show('fast');
[jQuery] Dynamic content rendering anomaly
First: this page validates. I've gone as far as running the "rendered code" through the WDG validator. No errors. No CSS errors either. Renders fine in IE 6, 7. Firefox, does a trick with the top of the table.show(), extending the border-top of the table beyond the right end of the box element... Here's a demo page. Click the submit button to see the result table http://www.nativeintelligence.com/survey.asp I think the problem has something to do with the jQuery .show() function? Sam
[jQuery] Jquery compat-1.0.js patch kills thickbox 3.0
I installed jquery 1.1.2, thickbox 3.0 and the compat-1.0.js patch for Drupal all on the same site and Thickbox died quickly. I played around with the code for a while and found that a call to show() in TB was the culprit. Wondering how to attack these kinds of problems in the future. On the one hand, I don't know who supports the compat patch (John, maybe?) to report bugs as I come across them. On the other, I don't know the actual API for jquery 1.0 - was show() part of the deal back then? Any
[jQuery] Working only after refreshing
I've got simple code (at the bottom) which move up articleContent its margin-top depends on #otherArticles height, its work but only when I refresh my site. Is any trick which allows me to make it work correctly? $(document).ready(function() { $("#articleContent").css({ "margin-top": -($("#otherArticles").height()+15 }); )};
[jQuery] How to handle Pseudo leak in IE?
Hi all, I'm dealing with the IE memory problem. There is an IE leak called 'pseudo leak', where removeChild() is not really removing child from memory. It is pseudo because it would be cleared after refresh. (some detail: <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/ie_leak_patterns.asp" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/IETechCol/dnwebgen/ie_leak_patterns.asp
Next Page