Re: [jQuery] New Forums
Well stated, Shawn. I wholeheartedly concur.
Re: [jQuery] class="{title:'test'}
This is utilizing the metadata plugin for jQuery. It handles that sort of stuff. Sent from my iPhone On Jan 20, 2010, at 3:34, fran23 wrote: I don't know how to handle class="{title:'test'} it's out of the mb.extruder plugin logo ... normally I assign a class (i.e. class="abc") and set "abc" via CSS .abc { ... } but I don't know what to do with class="{title:'test'} May anybody give an explanation or link where I can learn about it? thx fran -- View this message in context: http://old.nabble.com/class%3D%22%7Btitle%3A%27test%27%7D-tp27238929s27240p27238929.html Sent from the jQuery General Discussion mailing list archive at Nabble.com .
Re: [jQuery] how to get href value
$("a").attr("href");
Re: [jQuery] New Forums
I concur regarding mailing list vs. forum. Both have their positives and negatives, but these days I definitely prefer a mailing list over forums. Perhaps the jQuery team could not find another mailing list that would import all of the existing posts on Google Groups? (My understanding is that they were able to do just that with the new forums.)
[jQuery] New Forums
Hello, I received an email inviting me to join the new jQuery forums. It contained a username and password for me to use. However, when I try to login, I am told that my email address has not been confirmed and therefore cannot do so. A link to a help page is given whereby I can allegedly have a confirmation email sent by following a list of instructions. Interestingly enough, the very first step given in the instructions is to login. I thought that perhaps I would be able to do so at the link given, but alas an attempt to login there results in the exact same message and help link being presented. Any suggestions on how to actually login/activate would be appreciated. :-)
Re: [jQuery] Re: iTunes Style Slider
Z, thanks for the reply. I found that project yesterday after I had posted. I also found a couple of others. The problem is that they either a) only work in Firefox (like the one you found) or b) are not full-featured like the MooTools one. The closest I have found - which seems to be the only one that has good cross-browser support - is this one: http://paulbakaus.com/lab/js/coverflow/ Anyways, thanks again for your reply. It is much appreciated. :-)
[jQuery] iTunes Style Slider
Hello, I found an iTunes style slider/rotator that has been done in MooTools, demoed here: http://www.outcut.de/MooFlow/example-ajax.html. I was wondering if either a) such a thing already existed in a jQuery plugin, or b) if there was a jQuery master who could port it in quick fashion? If b), please contact me off-list and let me know how much you would charge and what the turnaround time would be. :-) Thanks in advance!
Re: [jQuery] jquery form...
Why? Simple. Because the variable does not exist. :D On Mon, Nov 9, 2009 at 7:09 PM, Lord Gustavo Miguel Angel wrote: > hi. > i´m try with this example: > http://www.malsup.com/jquery/form/#json > > but Alert(data.message) return "undefinited" > why? > > tk-. >
Re: [jQuery] jQuery only works in offline files?!
I'm going to say that there is about a 99.99% chance that the paths to your CSS and jQuery files are incorrect.
[jQuery] Re: My code is not working getting an error missing )
Add a ) to the end. You have to close the opening hover() function call.
[jQuery] Re: been asked 1000 times?
Use class instead of id. $('.open-frame')
[jQuery] Re: Ajax problem on Safari/Chrome browsers
@ Mike - Thanks for making me take a closer look at the original code. I get it now. My bad. /me crawls back into his cave to hibernate some more
[jQuery] Re: Ajax problem on Safari/Chrome browsers
That code should not work on _any_ browser. In the onclick attribute you are grqbbing a reference to the containing div ($ ('#followButton2')), which clearly has no method named followUser. Try something like this instead:
[jQuery] Re: jQuery in loaded content doesn't work
My bad. I must admit that I did not read through the entire post, and also did not realize that the livequery plugin offered additional functionality. I was under the impression that it had been fully included into the core with live(). However, I have been corrected a couple of times after making this post. :-)
[jQuery] Re: jQuery in loaded content doesn't work
If you're using jQuery 1.3.x (and you should be), there's no need for the livequery plugin. http://docs.jquery.com/Events/live
[jQuery] Re: validation: how do I make sure a radio button is picked?
Perhaps I am misunderstanding something in your requirements, but with the validation plugin (link below), it is as simple as adding class="required" to the input tag. http://docs.jquery.com/Plugins/Validation HTH
[jQuery] Re: jquery .noconflict
That is exactly what it means.
[jQuery] Re: jquery .noconflict
Straight from the docs http://docs.jquery.com/Core/jQuery.noConflict *NOTE:* This function must be called after including the jQuery javascript file, but *before* including any other conflicting library, and also before actually that other conflicting library gets used, in case jQuery is included last.
[jQuery] Re: [validate] Either this field OR this field OR both
Ooops... rules : { thisField : { required: true, depends: function(element) { return $('#thatField').length == 0; } } thatField : { required: true, depends: function(element) { return $('#thisField').length == 0; } } }
[jQuery] Re: [validate] Either this field OR this field OR both
rules : { thisField : { depends: function(element) { return $('#thatField').length == 0; } } thatField : { depends: function(element) { return $('#thisField').length == 0; } } } Check the plugin docs for more info. http://docs.jquery.com/Plugins/Validation/
[jQuery] Re: jQuery and Ruby on Rails
jQuery is client side. Ruby is server side. jQuery (or any JavaScript) is completely incapable of setting a Ruby (or any server-side language) variable. However, you can use jQuery's $.ajax() method to send an asynchronous request to the server, passing along the variable value. Check the jQuery docs for details on the $.ajax() method.
[jQuery] Re: Ticket: [1758-5724031711]
John, I'm not the "offender", but he did apologize and explain. http://groups.google.com/group/jquery-en/browse_thread/thread/c661f1f17c5d374b HTH On Tue, Mar 24, 2009 at 5:28 PM, John Resig wrote: > > Uhhh... why were there like 30 of these submitted to the mailing list? > Your email address has now been banned. Please contact me off-list if > you wish to rectify the situation. > > --John >
[jQuery] Re: jQuery.com homepage "News from the jQuery Blog" not up to date?!
jQuery 1.3.1 Released, dated January 21st is the latest one that I see. On Wed, Mar 11, 2009 at 11:16 PM, jQuery Lover wrote: > > Mine is up to date... the latest news is about jquery ui 1.7 release... > > Anyone with similar problems ? >
[jQuery] Re: $.getJSON
Yes. On Mon, Mar 2, 2009 at 3:35 AM, Alain Roger wrote: > Hi Wil, > > so if i understood well, having the following JSON: > >> {"records":[{"id":1,"abbreviation":"fre","description":"french"},{"id":2,"abbreviation":"eng","description" >> :"english"},{"id":3,"abbreviation":"ger","description":"german"},{"id":4,"abbreviation":"svk","description" >> >> :"slovak"},{"id":5,"abbreviation":"spa","description":"spanish"},{"id":6,"abbreviation":"usa","description" >> :"american"},{"id":7,"abbreviation":"ita","description":"italian"},{"id":8,"abbreviation":"por","description" >> >> :"portuguese"},{"id":9,"abbreviation":"cze","description":"czech"},{"id":10,"abbreviation":"rus","description" >> :"russian"},null,null,null]} >> >> i should write : >$.each(data.records, function(i,item){...}); > > where "data.records" is the name of my JSON result...so records (in my > JSON). > am I right ? > > A> > > >
[jQuery] Re: Ajax tabs in non JavaScript browsers
The 'j' in Ajax is 'JavaScript'. Bottom line is, if the browser has JavaScript disabled, you cannot use Ajax.
[jQuery] Re: jQuery w ajaxCFC
cflib.org has a UDF that should do the trick for you. I think it's called serializeJSON(). Might want to give that a shot. On Fri, Feb 13, 2009 at 10:06 PM, Neil Bailey wrote: > > We're using CF7, which doesn't support a returntype of JSON - I wish. > > I am looking into simply returning a "jsonEncode"ed string... > > I cannot tell you how much I appreciate you're help. >
[jQuery] Re: In this code, what would $(this) in the success part refer to?
Just to be clear, I'm kinda doubting that anyone has an issue with "n00b" questions. I believe what people take exception to is the exact same person asking the exact same type of questions over and over and over and over again (for years, even), with the expectation of someone else writing all of the code for them, rather than learning from the help they've received. ;-)
[jQuery] Re: In this code, what would $(this) in the success part refer to?
On Tue, Jan 13, 2009 at 10:54 PM, Rick Faircloth wrote: > If you are sick and tired of helping me, then don't. > > I don't remember having any contract with you. > You couldn't afford a contract with me. And, fyi, I do help myself…I do read the docs and search > > for blogs, tutorials etc. > Really? Seriously? You just proved in this very thread that you _don't_ read the docs. But it's much quicker to just ask > > a question if I'm not sure where to look for an answer. > Right. That's the point. Your first step in solving a problem is to ask yourself, "Self, which list should I ask this question to?". Instead actually _trying_ code, you'd rather type an email, and wait an hour or two for someone else to do your work for you rather than actually learning how to do it yourself. > Again, when you see my name on a post, if you don't want to > > help, please don't. > No worries there. I'm an asshole. I refuse to help those who are too lazy to help themselves. And no, searching google for copy/paste code is not helping yourself.
[jQuery] Re: In this code, what would $(this) in the success part refer to?
Has it ever occurred to you that maybe, just maybe, people are sick and tired of helping you when you refuse to help yourself? On Tue, Jan 13, 2009 at 10:32 PM, Rick Faircloth wrote: > > This is a completely different part of the problem. > The other parts have been solved, but I couldn't make sense > of the success part. > > If you don't want to help, don't respond. > > And if you really are concerned about the number of posts, > contribute to making them unnecessary by helping with the problem. > > You took up more "ink" on the page by complaining about the > posts than you would if you had just answered the question. > > I'll just assume you don't know...so please keep the responses > off my thread unless you want to be helpful. > > Rick >
[jQuery] Re: Noob Q. Can't get jQuery working
Probably because the path to jQuery is incorrect and therefore jQuery is not actually loaded. On Thu, Jan 1, 2009 at 5:26 AM, spstieng wrote: > > Now, clicking Test B links dislays the 'Hello World' alert. > But nothing happends when I click Test A. Why is that? >
[jQuery] Re: selectChain Plugin - Fires on Page Load
Bump (again). :-) Is my question that difficult, or just that stupid? ;-) On Tue, Dec 9, 2008 at 8:04 PM, Matt Quackenbush wrote: > Hello, > > I am using Remy's most excellent selectChain plugin ( > http://remysharp.com/2007/09/18/auto-populate-multiple-select-boxes/), but > I do not want it to fire on page load, unless the top level select box has a > pre-selected value. I've tried a couple of ways to create that > functionality, but I can't quite seem to get it right. Any thoughts or > suggestions to steer me down the correct path would be much appreciated. > :-) > > > Thanks, > > Matt > >
[jQuery] Re: selectChain Plugin - Fires on Page Load
Bump. :-) On Tue, Dec 9, 2008 at 8:04 PM, Matt Quackenbush wrote: > Hello, > > I am using Remy's most excellent selectChain plugin ( > http://remysharp.com/2007/09/18/auto-populate-multiple-select-boxes/), but > I do not want it to fire on page load, unless the top level select box has a > pre-selected value. I've tried a couple of ways to create that > functionality, but I can't quite seem to get it right. Any thoughts or > suggestions to steer me down the correct path would be much appreciated. > :-) > > > Thanks, > > Matt > >
[jQuery] selectChain Plugin - Fires on Page Load
Hello, I am using Remy's most excellent selectChain plugin ( http://remysharp.com/2007/09/18/auto-populate-multiple-select-boxes/), but I do not want it to fire on page load, unless the top level select box has a pre-selected value. I've tried a couple of ways to create that functionality, but I can't quite seem to get it right. Any thoughts or suggestions to steer me down the correct path would be much appreciated. :-) Thanks, Matt
[jQuery] Re: Validate Plugin Exceptions
Jorn, All I can say is "thank you", and I feel like a complete moron. I had mistakenly read it as "1.2.6" in the document head, when in fact that particular application was using 1.2.1. Thank you very much for your keen eye. "Problem" fixed. Thanks again, Matt On Tue, Jun 10, 2008 at 4:51 PM, Jörn Zaefferer wrote: > > Well, your stack includes "jquery-1.2.1.pack". That indicated to me > you've got the wrong version. > > Otherwise, please post a testpage. > > Jörn >
[jQuery] Re: Validate Plugin Exceptions
Jorn, I am running jQuery-1.2.6.pack.js with this. I have a number of forms running this exact configuration with no issues whatsoever. That's why I am pulling my hair out on this one. It makes no sense to me. Any other thoughts/ideas? Thanks, Matt On Tue, Jun 10, 2008 at 6:58 AM, Jörn Zaefferer wrote: > > Please update to jQuery 1.2.6. > > Jörn >
[jQuery] Validate Plugin Exceptions
Hello, For some reason I am receiving the following two errors in Firebug when attempting to load a form that makes use of the Validation plugin. I am using this in a number of places without any errors, so this has me a bit confused. I even commented out all of the form fields and any other scripts, figuring that one or more of them were causing some sort of conflict, but everything I do results in the same two exceptions being thrown. Can anyone point me in the right direction? jquery.validate.js (line 1114) $.event.special has no properties (no name)("focus", "focusin") e(Object focus=focusin blur=focusout, function(), undefined)jquery-1.2.1.pack... (line 11) (no name)(function())jquery.validate.j... (line 1103) handler: function(e) { jquery.validate.js (line 294) jQuery(this.currentForm).delegate is not a function init() validator(undefined, form#[object HTMLInputElement].uniForm doAdd)jquery.validate.j... (line 183) validate(undefined)jquery.validate.j... (line 32) (no name)()add (line 22) e()jquery-1.2.1.pack... (line 11) e()jquery-1.2.1.pack... (line 11) e([function(), function(), function()], function(), undefined)jquery-1.2.1.pack... (line 11) e()jquery-1.2.1.pack... (line 11) .delegate("focusin focusout keyup", ":text, :password, :file, select, textar... By the way, I am using version 1.3. Thanks in advance, Matt
[jQuery] Re: Validation Plugin Mod
All fixed up. :-) Thanks to Jorn for an awesome plugin!
[jQuery] Re: Validation Plugin Mod
Okay, problem #2 from the original post has been solved. I finally found the .errors() function and was able to modify it to suit my purposes. Any ideas on how to solve problem #1 would be much appreciated. :-) Thanks, Matt
[jQuery] Re: Validation Plugin Mod
I'm 99.9% certain that I have correctly deduced that the reason for the continued addition of the error messages to the DOM is that the errorsFor: function() [see below] is not finding the ones that have been added already. errorsFor: function(element) { > return this.errors().filter('p[id="error-' + this.idOrName(element) + > '"]'); // edited MQ - p[id=error- instead of [EMAIL PROTECTED] > }, > What I'm not sure of is _why_ it's not finding anything. I have also tried .filter("[EMAIL PROTECTED]'error-" + this.idOrName(element) + "']"); but still without success. I have searched around the docs and the script itself to try and learn what .errors() does, but have not yet been able to find anything on it. I thought maybe it returned an array of elements that have the class of 'error' attached to them, but that does not seem to be the case. Can anyone point me in the right direction? Once again, you can see this in action at http://www.quackfuzed.com/stuff/jquery/. Thanks, Matt
[jQuery] Validation Plugin Mod
Hello, I am working with Jorn's most excellent form validation plugin ( http://bassistance.de/jquery-plugins/jquery-plugin-validation/), making an attempt to modify it for use with the Uni-Form markup ( http://dnevnikeklektika.com/uni-form/). I have made several changes and am mostly there, but I am hung on two major things: 1) I need to insert my error message just inside the "holder" div instead of just before the input field. The desired markup: My error message My Form Field I have slightly altered lines 597-602 in the v1.3 jquery.validate.js file, running insertBefore() instead of insertAfter(). if ( !this.labelContainer.append(label).length ) this.settings.errorPlacement ? this.settings.errorPlacement(label, jQuery(element) ) : label.insertBefore(element); // inserts before the This gets me partially where I want to be, but the new is placed immediately before the ... My Form Field My error message I have tried quite a variety of things in an effort to achieve the desired results, but so far everything I have tried results in one error or another. Here is an example of what I have tried: : label.insertBefore(element.parents("div.ctrlHolder").children("label")); // attempt to insert before the 2) For some reason that I have yet to figure out, the changes I have made cause error messages (the validation error message) to be generated each time the offending field is placed into focus and then clicked out of. Hopefully this explanation will clarify what I mean. a - submit the form, leaving a required field empty b - an error message is added to the DOM, and the first offending field is placed into focus c - click out of the field, and the error message is added again to the DOM, resulting in two error messages being displayed d - place the cursor back inside the field e - click out of the field, and yet another error message is added to the DOM Repeat steps 'd' and 'e' as often as you'd like, and you'll keep getting error messages added to the DOM. Obviously the changes that I have made are causing this, I'm just not seeing it. I'm hoping that a set of fresh eyes will be able to spot the issue. :-) Here is the complete showLabel: function() and the errorsFor: function() as edited by me... showLabel: function(element, message) { var label = this.errorsFor( element ); if ( label.length ) { // refresh error/success class label.removeClass().addClass( this.settings.errorClass ); // check if we have a generated label, replace the message then label.attr("generated") && label.html(message); } else { // create label label = jQuery("") // edited MQ - p instead of this.settings.errorElement .attr({id: "error-" + this.idOrName(element), generated: true}) // edited MQ - id: "error-" instead of "for": .addClass("errorField bold") // edited MQ - errorField bold instead of this.settings.errorClass .html(message || ""); if ( this.settings.wrapper ) { // make sure the element is visible, even in IE // actually showing the wrapped element is handled elsewhere label = label.hide().show().wrap("<" + this.settings.wrapper + ">").parent(); } if ( !this.labelContainer.append(label).length ) this.settings.errorPlacement ? this.settings.errorPlacement(label, jQuery(element) ) : label.insertBefore(element); // edited MQ - insertBefore() instead of insertAfter() label.parents("div.ctrlHolder").addClass("error"); // added MQ - add "error" class to the holding div } if ( !message && this.settings.success ) { label.text(""); typeof this.settings.success == "string" ? label.addClass( this.settings.success ) : this.settings.success( label ); } this.toShow.push(label); }, errorsFor: function(element) { return this.errors().filter('p[id="error-' + this.idOrName(element) + '"]'); // edited MQ - p[id=error- instead of [EMAIL PROTECTED] }, You can see this in action at http://www.quackfuzed.com/stuff/jquery/ Thanks in advance for your guidance. :-) Matt
[jQuery] Re: attr('form') not work in firefox
Unless I'm completely misunderstanding something here, that code should not "work" in any browser. There is no "form" attribute on an element. What are you actually trying to accomplish? On Sun, May 18, 2008 at 8:22 PM, wrote: > > This is my html: > > > > and javascript: >
[jQuery] Re: how to get name attribute from $(this)
$(this).attr('name'); I think that's what you're looking for?
[jQuery] Re: Is it possible to do this with Jquery?
http://plugins.jquery.com/project/cycle On Jan 27, 2008 11:07 PM, cameron wrote: > I'm wondering if this is possible to do with jquery. > > An example of what I'm looking for can be found at the top of this > page; > http://www.scriptsearch.com/cgi-bin/jump.cgi?ID=687 > > The images are scrolling horizontally in a loop. On mouseover the > scroll pauses, on mouseout, it starts again. Each image can be a link. > > Is it possible to do this with a ul of images and some jquery? >
[jQuery] Re: Is there a .new() ?
David, Thanks for the reply. I had no idea that a new element could be created as you've shown. That's pretty cool, from a code standpoint. But if it's faster the way I've been doing it, I'll continue in that fashion. Matt
[jQuery] Is there a .new() ?
Hello, When my form is submitted, I want to add a couple of hidden form fields to the DOM. I know that I can accomplish the task like so: $("#myForm").submit(function() { var str = ""; $(this).append(str); }); But that just doesn't "feel" right to me. Is there a .new() method or something that would allow me to create the new element and then use the other methods (e.g. .new("input:hidden").attr("id").val("myid") ) before doing the .append() ? I'm not finding anything in the docs, so I'm guessing there is not; justwanted to check. Thanks, Matt
[jQuery] Re: $(this) and bind()? Noobish questions...
Micky, On .bind(), I'm afraid I'm in the same boat as you; total n00b, so I'm afraid I can't offer much help there. On the child selection, the selector that immediately comes to mind is parent > child. I could be mistaken, but I don't think you'll be able to use 'this', as it is a reference to the actual object. So, it'd be something like so: $("#myElementSelector > div.thumb").animate({ "height": "50px" }, "fast"); For more info, check the selectors info in the docs: http://docs.jquery.com/Selectors HTH Matt
[jQuery] Re: .::: New Social Networking Site :::.
God I hate spam.
[jQuery] Re: Feb 12 IE6 Forced Update
On Jan 24, 2008 8:21 AM, Andy Matthews wrote: > > I personally have put off installing it IE7 at home so that I can still > test > with IE6. > Andy, If you want to be able to test with IE6 and IE7 on the same machine, check out the following link. http://tredosoft.com/Multiple_IE I've been using Multiple IE's for a long, long time now with no problems. It's a lifesaver, in my opinion. Matt
[jQuery] Re: Radio Buttons and .val()
@Timothee, Giovanni - Thank you for your responses. It really annoys the hell out of me that Gmail and Google Groups both delayed your messages until I had already found the answer in the docs, and yet the timestamps are long before they showed up. I even blogged about it (link below). http://www.quackfuzed.com/index.cfm/2008/1/23/I-Love-Gmail-But Thanks, Matt
[jQuery] Re: Radio Buttons and .val()
On Jan 23, 2008 3:22 AM, Matt Quackenbush wrote: > str = $("input[name='addType']").val(); > Why is it that I always find the answer just after I send the email? God knows I hate that. Sorry guys. str = $("input[name='addType']:checked").val(); Thanks again, Matt
[jQuery] Radio Buttons and .val()
Hello, I am using the following to grab the value of a radio button: str = $("input[name='addType']").val(); The XHTML for the radio button is as follows: Premium Standard Even though the second radio button is set with the "checked" attribute, the jQuery snippet above always returns the value of the first radio button. I am obviously doing something wrong (again), but cannot seem to pinpoint the error of my ways. As always, thanks in advance for your assistance. Matt
[jQuery] Re: UI Dialog
Okay, I officially feel like an ID10T. Amazing how important the *^&@^*#$%& tiny details are. Thanks, Matt
[jQuery] UI Dialog
Hello, I'm trying to get the UI Dialog box implemented in a couple of the items that I am currently working on, but am apparently doing something incorrectly. Here's the relevant code that I'm testing... $(document).ready(function() { $("#open-dialog").click(function() { $("#popup-box").dialog().show(); return false; }); }); Add Listing This is da chit! If I place the above code in my actual file, the "box top" and the background don't show up. You can see this here: http://i208.photobucket.com/albums/bb81/nascardiac/dialog_bad_2008_01_22.jpg However, if I take that exact code and move it to its own file, everything works as expected. And here's a screen cap: http://i208.photobucket.com/albums/bb81/nascardiac/dialog_good_2008_01_22.jpg I've tried just about everything I can think of, but nothing I've tried has any affect at all. I'm hoping that more sets of eyes will help pinpoint what I'm doing incorrectly. Thanks in advance, Matt
[jQuery] Re: Manipulate Element After Being Added to DOM
Karl, Thank you, thank you, thank you, thank you, thank you, and THANK YOU! By the way, in case I forgot, please, let me be sure to say "Thank you!" before signing off. Thanks, Matt On Jan 20, 2008 9:53 PM, Karl Rudd wrote: > You might like to look at the "LiveQuery" plugin ( > http://plugins.jquery.com/project/livequery ) as is manages all newly > added elements so they get the previously attached handlers attached > to them when they're added to a page. > > Karl Rudd >
[jQuery] RE: Manipulate Element After Being Added to DOM
Okay, in my continued pursuit of finding out what I've done wrong, I hard-coded into the html a block identical to the one that jQuery adds to the DOM via the "Add an Item" link/button. When using this, my "Remove this Item" button/link works perfectly. In addition, I am using the Highlighter plugin to highlight each form "row" as it is focused on. The highlight does not work with the jQuery-added elements. These two items have me quite puzzled, as this seems to be counter-productive behavior. I'm guessing that it's being caused by something that I'm doing wrong though, so I am including my "Add an Item" function so that all of you much brighter (and more experienced) people can show me the error of my ways. ;-) $("a.add-item").click(function() { var n = $("div.addtl-item").length; var str = ""; str = 'Additional Item #' + (n+1) + ' (Type) Premium Standard'; str = str + '* Additional Item #' + (n+1) + ' (Category)Select One'; str = str + 'Remove Additional Listing # '+ (n+1) + ''; $("#end-addtl-items").prepend(str); return false; }); Sorry for the lengthy code. I tried to format it so it'd be easier to read, but I'm sure that the mail or the list server will jack it all up. Thanks again, Matt
[jQuery] Manipulate Element After Being Added to DOM
Hello, I'm working on a form that allows the user to click an "Add an Item" button in order to add another item to their order. When this button is clicked, I have jQuery add another couple of fields to the form, so the user can input the data. Along with the added form fields, a "Remove This Item" button is also added to the DOM. All of this portion works nicely. It's the reverse that I'm having trouble with. What I'm trying to do is to call empty() on the container of the clicked "Remove This Item" button (actually, an anchor). I am getting no errors at all in FireBug, but when the anchor is clicked, the jQuery script is completely ignored and the browser follows the link. So, my question is: does jQuery support manipulation of an element that has been added to the DOM via Javascript? I would assume that it does, but I'm not understanding why my "remove" function (code below) is being ignored. $("a.remove-item").click(function() { var splt = $(this).attr("id").split("-"); var n = splt[1]; $("#container-" + n).empty(); return false; }); Thanks in advance, Matt
[jQuery] Re: jQuery Tabs - Can I Do This?
Klaus, thank you very much for your input and thoughts on the topic, as well as the link. Interesting reading, indeed. I shall most definitely give more thought to the task at hand. Stephen, thanks also for the potential solution. I sincerely appreciate it. jQuery is awesome, and this list is one of the most useful and helpful lists to which I subscribe. Thank you to all of you guys (and girls) that make jQuery rock! :-) Matt
[jQuery] jQuery Tabs - Can I Do This?
I'm using the Tabs plugin, and have a question. My First Tab My Second Tab http://www.someothersite.com/";>My Third Tab // my content // my other content Is it possible to get that third tab to actually go to the off-site URL when clicked? I tried this, but the link was ignored, so I'm not sure if I've done something wrong, or if it's just not possible as written. Thanks in advance. Matt
[jQuery] ClueTip: topOffset + width
Hello, I am using the ClueTip plugin for the first time, and I'm loving it. However, I am having difficulty with positioning whenever I supply both 'topOffset' and 'width' as arguments. One without the other works just fine, but together, 'topOffset' is totally ignored. $(document).ready(function() { $('caption .cluetip-wide').cluetip({topOffset: '-15px', width: '450px'}); }); Any "clues" or "tips" showing me the errors of my ways would be most appreciated. :-) Thanks in advance, Matt
[jQuery] Re: Alter Status Message
@ Josh, Dave - thanks for pointing out that I had missed the 2nd function. Dave, thanks also for pointing out the disabling of the status bar stuff. I hadn't paid attention to that before. Kinda makes what I was trying to do pointless, which is always good to know before one spends hours and hours trying something. ;-) @ Alexx - that is an excellent suggestion, but not quite applicable to what I was attempting to accomplish in this particular example. I'm not actually tracking the clicks locally, but was making a stab at masking (from the casual user) the fact that they're affiliate links. But were I actually tracking them, I'd definitely use your strategy. Thanks to all. The jQuery list rocks! :-)
[jQuery] Alter Status Message
Hello, I have a redirect page, but would like to change the status bar message to show only the target link, rather than the full URL. So, links that hit the redirect page are formed like so: http://mydomain.com/redirect.cfm?DURL=http://www.realtarget.com/realpage.htm What I want to actually show in the status bar is: http://www.realtarget.com/realpage.htm I was confident that I could easily handle such a task by throwing together a quick little jQuery-powered script, and here's what I came up with: $(document).ready(function() { $("#main #welcome a").hover( function() { var href = $(this).attr('href'); var a1 = href.split("DURL="); if (a1 != href) { window.status = a1[1]; } } ); }); On mouseover, the status bar display is not affected. On mouseout, FireBug reports the following error message: g has no properties handleHover(mouseout clientX=0, clientY=0)jquery-packed.js (line 1) e(mouseout clientX=0, clientY=0)jquery-packed.js (line 1) e()jquery-packed.js (line 1) eval(function(p,a,c,k,e,r){e=function(c){return(c
[jQuery] Re: jQuery n00b
Evan, Andy, Scott, Karl- Thank you for the replies. One portion has been solved: getting at the correct href w/o writing a bunch of functions. The following does the trick: var href = $(this).attr('href'); I had previously tried simply using $("#stand-summary").load(this.href) but was unsuccessful. Also thank you for pointing out the over-zealousness of my XPath solution vs. a simple CSS selector solution. Sometimes I get carried away with writing "cool stuff" and don't think of the simple solution. :-) Can't really comment on the AJAX, because it could be a server side error. I didn't think this was the case, as it is simply requesting a flat HTML file, and the path/name is identical to the "working" version. I also received no errors in FireBug - I thought (the page was reloading, so I couldn't see it). But I just opened FireBug and was playing around with the code to see what, if anything would generate an error. If I comment out the .load() call, the responseText is appropriately returned from the server. However, once I uncomment it, the following error is generated: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: javascript: eval(__firebugTemp__); :: anonymous :: line 1" data: no] Any ideas as to what that is trying to tell me? One other related question... According to the jQuery docs, you can set the AJAX defaults by calling $.ajaxSetup(). In their example, they say that the following code "Sets the defaults for AJAX requests to the url '/xmlhttp/' .". $.ajaxSetup({ url: "/xmlhttp/", global: false, type: "POST" }); As I understand that statement, it means that I can now use $.ajax({ url: " foo.htm" }) and jQuery will prepend "/xmlhttp/" to "foo.htm", as though I had written $.ajax({ url: "/xmlhttp/foo.htm" }). Am I correctly understanding that? I ask because I've written the following code, which appears before the .click() block, but it does not seem to behave in this manner. $.ajaxSetup({ url: "ajax/", global: false, type: "GET" }); In FireBug, I get the dreaded 404 returned if I do not prepend the "ajax/" to the url in my $.ajax() call. Thanks again, Matt