[jQuery] Re: unload

2007-09-25 Thread Erik Beeson
: On Sep 24, 12:53 pm, Erik Beeson [EMAIL PROTECTED] wrote: Try $(window).unload(...). Works for me on firefox. I think these docs are wrong:http://docs.jquery.com/Events/unload#fn Thanks. That worked for when the window changes or redirects. Is there anyway to detect a browser window being

[jQuery] Re: image preload problem (encore)

2007-09-25 Thread Erik Beeson
There are a lot of things that seem very strange about what you're doing. Basic preloading can be a simple as: function loadImages() { $.each(arguments, function(i, url) { var image = new Image(); image.onload = function() { // do

[jQuery] Re: unload

2007-09-24 Thread Erik Beeson
Try $(window).unload(...). Works for me on firefox. I think these docs are wrong: http://docs.jquery.com/Events/unload#fn --Erik On 9/24/07, Trans [EMAIL PROTECTED] wrote: I tried this: $(document).unload(function() { alert(Bye now!); } ); But it doesn't seem to do anything. What am I

[jQuery] Re: .click() not working in ie6... 'g' is null or not an object

2007-09-24 Thread Erik Beeson
hover expects 2 functions, so getting an error isn't surprising. After a cursory look at your code, one thing that jumps out is I suggest you don't do $('div#wrap').attr('class') == xlarge. Instead, do: $('div#wrap').is(.xlarge). Other than that, maybe verify that your selector is working right

[jQuery] Re: Metadata plugin performance issues

2007-09-23 Thread Erik Beeson
I do it like this: div id=div1 class={field1: 'value1', field2: 'value2'}/div It costs more performance-wise, but I think it is worth it in terms of flexibility and clarity, which is why I went out of my way to fine- tune the metadata plugin. I went with the nested script block because I

[jQuery] Re: Metadata plugin performance issues

2007-09-22 Thread Erik Beeson
I didn't know about logical operator short-circuiting, thanks for the info - it's good to know. But this obviously wasn't in place on my tests or I wouldn't have got the results I did. So I don't think logical operator short-circuiting is a reliable enough solution to this problem... Why

[jQuery] Re: Metadata plugin performance issues

2007-09-21 Thread Erik Beeson
Thanks for this info. I eventually gave up on the metadata plugin in favor of a global variable for holding my metadata. So instead of $('#someID')[0].data, I now just do mynamespace.mydata['someID']. You mention breaking up the if statement to keep a function call from happening. Thanks to

[jQuery] Re: Verizon Wireless website using jQuery?

2007-09-20 Thread Erik Beeson
That script is how everything looks when it's run through Packer. Though it has the tell-tale $events object, it doesn't have the global jQuery object. Ah, there's a global MooTools object. I'd say it's MooTools :) --Erik On 9/20/07, Josh Nathanson [EMAIL PROTECTED] wrote: Spotted in the

[jQuery] Re: Verizon Wireless website using jQuery?

2007-09-20 Thread Erik Beeson
Those MooTools punks stole our filesize! --Erik On 9/20/07, Josh Nathanson [EMAIL PROTECTED] wrote: OK, sorry about that. Weird though that it's also 27K packed. - Original Message - From: Michael Geary [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Thursday, September

[jQuery] Re: Problems with effects after ajax call

2007-09-19 Thread Erik Beeson
How does your code relate to ajax? I'm not getting it. What's in 'info'? --Erik On 9/19/07, Daniel Rossi [EMAIL PROTECTED] wrote: hi there seems to be a problem loading effects and jquery calls after an ajax call has loaded content, this will not work after an ajax call, the html doesnt

[jQuery] Re: AJAX, sessions, and HTTP Status Codes

2007-09-19 Thread Erik Beeson
, Pops [EMAIL PROTECTED] wrote: Erik, Are you asking if using 410 is appropiate here? -- HLS On Sep 18, 5:43 pm, Erik Beeson [EMAIL PROTECTED] wrote: I've been thinking about using HTTP Status codes and a global ajax event to deal with session timeouts. Here's a little example: http

[jQuery] Re: ajax response url

2007-09-19 Thread Erik Beeson
As far as I can tell, this can't be done cross-browser. Firefox has an xhr.channel object that has both the original URL, and the redirected URL in various places, but there seems to be no such thing available in Safari 2. And xhr.getAllResponseHeaders() gives the headers for the post-redirected

[jQuery] Re: How to return a click event from the container function

2007-09-19 Thread Erik Beeson
For that to happen, showDialog would have to block until the dialog was closed, and that's not how JavaScript works. To do what you want, pass a callback function to showDialog and call it on close. Something like this (untested): this.showDialog = function(msg, buttons, onHide) {

[jQuery] Re: jQuery UI

2007-09-19 Thread Erik Beeson
The demos on the main UI page show an example that uses grid: http://ui.jquery.com/ It's also available here: http://dev.jquery.com/view/trunk/plugins/ui/demos/ui.draggable.html --Erik On 9/19/07, Frank Peterson [EMAIL PROTECTED] wrote: Draggable for the UI has options, like GRID but

[jQuery] Re: Determining the source of a load

2007-09-19 Thread Erik Beeson
something that it was suppose to do. Actually the status code seems to be a bit disappointing in general. It would be easiest if it just had a returning url property cheers dn On Sep 18, 2:12 pm, Erik Beeson [EMAIL PROTECTED] wrote: Ick, don't check the content. That's very ugly. You

[jQuery] Re: Update div

2007-09-19 Thread Erik Beeson
The Taconite plugin is good for that kind of thing. Not sure if it's been update for 1.2 yet: http://www.malsup.com/jquery/taconite/ --Erik On 9/19/07, David [EMAIL PROTECTED] wrote: How update multiple div by ajax from php?

[jQuery] Re: How to return a click event from the container function

2007-09-19 Thread Erik Beeson
be cached? Thanks! Brook From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Erik Beeson Sent: September 19, 2007 11:39 AM To: jquery-en@googlegroups.com Subject: [jQuery] Re: How to return a click event from the container function

[jQuery] Re: Interface v1.2 Error with jQuery v1.2.1

2007-09-18 Thread Erik Beeson
Are there plans to port Interface to the latest jQuery? Is Interface still supported by the author? I can't speak for the author, but I'd guess it won't be updated to work with 1.2 since the author is currently focusing on the recently released jQuery UI, which is a complete rewrite of much

[jQuery] Re: Convert new lines to br

2007-09-18 Thread Erik Beeson
I think that will only replace the first one. To replace all of them, you need /\n/g like Pops suggested. --Erik On 9/18/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: There is no such jQuery function. Fortunately, JavaScript the language itself provides use with String.replace(). Use

[jQuery] Re: Google Code

2007-09-18 Thread Erik Beeson
And it can barely be used by Java developers. It's good for making gmail and google reader, but I found it pretty difficult to deal with in general. It's really wants to hijack your whole application, and doesn't play well with anything that's not made to work with it, in my (limited) experience.

[jQuery] Re: [SITE SUBMISSION] Google Code

2007-09-18 Thread Erik Beeson
My first thought was, Hey! They're hotlinking it! How dare! But then I realized they're hotlinking to a file they're hosting, so I guess they can do that :) --Erik On 9/18/07, Rey Bango [EMAIL PROTECTED] wrote: The next time you hear someone say that jQuery isn't a mature framework, be sure

[jQuery] Re: Determining the source of a load

2007-09-18 Thread Erik Beeson
Ick, don't check the content. That's very ugly. You could always return JSON objects that include status information, or better yet, use HTTP status codes. I'll provide an example in a new thread. --Erik On 9/18/07, dougXN [EMAIL PROTECTED] wrote: We have a website that requires login. When

[jQuery] Re: [SITE SUBMISSION] Google Code

2007-09-18 Thread Erik Beeson
[mailto:[EMAIL PROTECTED] *On Behalf Of *Erik Beeson *Sent:* Tuesday, September 18, 2007 3:52 PM *To:* jquery-en@googlegroups.com *Subject:* [jQuery] Re: [SITE SUBMISSION] Google Code My first thought was, Hey! They're hotlinking it! How dare! But then I realized they're hotlinking to a file

[jQuery] AJAX, sessions, and HTTP Status Codes

2007-09-18 Thread Erik Beeson
I've been thinking about using HTTP Status codes and a global ajax event to deal with session timeouts. Here's a little example: http://erikandcolleen.com/erik/projects/jquery/ajaxlogin/ Seems to work well in FF and Safari (both OSX). Is this a sound way of dealing with this? And are there any

[jQuery] Re: jquery looping is slow

2007-09-18 Thread Erik Beeson
Now there's a trolling subject if I've ever seen one. I don't think the looping mechanism itself is slow. Probably your some manipulation part is what's slowing you down so bad. Here's a quick little test, performed at jquery.com using firebug console: for(var i = 0; i 1000; i++)

[jQuery] Re: Now, what does this *really* mean?

2007-09-18 Thread Erik Beeson
No, see here: http://www.google.com/search?q=javascript+is+not+java jQuery will work fine, though I've heard bad things about GoDaddy in general. --Erik On 9/18/07, Rick Faircloth [EMAIL PROTECTED] wrote: When GoDaddy.com tells me that with a hosting account that uses ColdFusion, I can't

[jQuery] Re: Now, what does this *really* mean?

2007-09-18 Thread Erik Beeson
Faircloth [EMAIL PROTECTED] wrote: Thanks for clearing that up, Erikā€¦ What kind of things have you heard about GoDaddy hosting? Rick From: jquery-en@googlegroups.com [mailto: [EMAIL PROTECTED] On Behalf Of Erik Beeson Sent: Tuesday, September 18, 2007 7:35 PM To: jquery-en

[jQuery] Re: Selecting relative or absolute positioned elements

2007-09-18 Thread Erik Beeson
Andy, I can't seem to get this code below to work. http://www.commadot.com/jquery/selectorNot.php You want: $('#container').children().filter(function() {return $(this).css('position') == 'relative';})...; That $('div', this) that you're doing is looking for divs that are children of your

[jQuery] Re: Selecting relative or absolute positioned elements

2007-09-18 Thread Erik Beeson
. :( http://www.commadot.com/jquery/selectorNot.php Glen On 9/18/07, Erik Beeson [EMAIL PROTECTED] wrote: Andy, I can't seem to get this code below to work. http://www.commadot.com/jquery/selectorNot.php You want: $('#container').children().filter(function() {return

[jQuery] Re: parents() clears vars

2007-09-17 Thread Erik Beeson
What does OK mean? What's the problem? How are you trying to use this function? --Erik On 9/17/07, Nikola Ivanov [EMAIL PROTECTED] wrote: I have the following funtion: function foo() { console.log( arguments ); // -- OK var e = arguments[0]; console.log( e );// --

[jQuery] Re: XPATH question

2007-09-16 Thread Erik Beeson
If you're using jQuery 1.2, you need the XPath plugin, available here: http://docs.jquery.com/Release:jQuery_1.2#XPath_Compatibility_Plugin See here for more info: http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality --Erik On 9/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I

[jQuery] Re: XPATH question

2007-09-16 Thread Erik Beeson
, Erik Beeson wrote: If you're using jQuery 1.2, you need the XPath plugin, available here: http://docs.jquery.com/Release:jQuery_1.2#XPath_Compatibility_Plugin See here for more info: http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality --Erik On 9/16/07, [EMAIL PROTECTED] [EMAIL

[jQuery] Re: Disable the Firefox Error Console

2007-09-15 Thread Erik Beeson
jQuery doesn't do anything in particular to trigger such a thing. Maybe it's something in a firefox extension that you have? --Erik On 9/15/07, quayfee [EMAIL PROTECTED] wrote: Hi All, I'm finding that the error console pops up on every .load() call, even if there are no errors. While

[jQuery] Re: Can anyone suggest a jQuery way of improving this UI? Screenshot included.

2007-09-15 Thread Erik Beeson
I think sortables are ideal for ordering situations. If nothing else, I suggest replacing your Position text box with a select box, and that delete checkbox with a delete button. I'd rather the checkboxes be on the left side of the labels. I know that breaks the label: control layout, but it

[jQuery] Re: Input type

2007-09-15 Thread Erik Beeson
Maybe: if($('#birth_date').attr('type') == 'text') { Or: if($('#birth_date')[0].type == 'text') { Or: if($('#birth_date').is(':text')) { Or if you just want to do something to birth_date if it is a certain type, then just: $('#birth_date:text').doSomething(); See here:

[jQuery] Re: Please help: How to simulate a Tab key press with jQuery

2007-09-15 Thread Erik Beeson
Can you not just focus the next field? Assuming your fields are all at the same level, just: $(/* current component */).next('input,select,textarea,button')[0].focus(); Does that makes sense? --Erik On 9/14/07, Mark [EMAIL PROTECTED] wrote: Hi, I have a very large and complex form, and I

[jQuery] Re: Browser compatibility

2007-09-15 Thread Erik Beeson
I'm unclear about what you expect to happen since it seems your theHover div is empty... But I suggest you don't define inline event handlers like that. Instead, add something like this to your HEAD tag: script type=text/javascript $(document).ready(function() {

[jQuery] Re: FadeIn

2007-09-15 Thread Erik Beeson
Maybe something like: $(window).load(function() { $('#myLogo').fadeIn('slow', function() { $('#navigation').fadeIn('slow'); }); }); That will fade in an element with id myLogo, then after it finishes fading in, it will fade in an element called navigation. See here:

[jQuery] Re: Selecting elements using '/'

2007-09-14 Thread Erik Beeson
$('form.formclass').find('li/label').each( That means all LABEL tags that are a direct descendant of a LI tag that is a child of a FORM tag with the class 'formclass'. $('form.formclass').find('li label').each( All LABEL tags that are a child of an LI tag that is a child of a FORM

[jQuery] Re: Selecting elements using '/'

2007-09-14 Thread Erik Beeson
I don't think that's what he was asking... On 9/14/07, Alexandre Plennevaux [EMAIL PROTECTED] wrote: / is a special character, you have to esccape it using \\ So $('form.formclass').find('li\\/label').each( -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL

[jQuery] Re: BUG ? cannot detect the id with :

2007-09-14 Thread Erik Beeson
The : conflicts with CSS pseudo classes. See: http://docs.jquery.com/DOM/Traversing/Selectors#CSS_Selectors And: http://www.w3.org/TR/2001/CR-css3-selectors-2003/#pseudo-classes --Erik On 9/14/07, Adwin Wijaya [EMAIL PROTECTED] wrote: I just wonder why in jquery we need to escape such an

[jQuery] Re: Invalid Argument in IE 7.0

2007-09-14 Thread Erik Beeson
How are you using it? --Erik On 9/14/07, Nico [EMAIL PROTECTED] wrote: Hello, I'm using the latest version of Jquery (1.2) and I need to use the attr() function. Unfortunately it doesn't work correctly with IE 7. I recieve a Javascript Error : Invalid Argument, Line 883. Does anyone

[jQuery] Re: Firefox not working with css child selectors (?!?)

2007-09-14 Thread Erik Beeson
Seems to work for me: http://erikandcolleen.com/erik/projects/jquery/nestedul/ Maybe there's a problem with your HTML? --Erik On 9/13/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Is there an issue with FF understanding css child selectors? I wouldn't think so, but I'm having an issue.

[jQuery] Re: Downloading 1.2 minified, getting 46kb instead of 14kb ??!?

2007-09-14 Thread Erik Beeson
I could understand this complaint if the 21kb packed link from the previous version were replaced with a 14kb min/gzip link, but that isn't the case. The 21kb packed link became a 26kb packed link, and a link to a minified version, which is ideal for gzipping, along with a link to a page

[jQuery] Re: OT: Hosting Service

2007-09-14 Thread Erik Beeson
I've recently moved over to dreamhost from 1and1, mainly because dreamhost gives me ssh access with a meaningful username and 1and1 made my username something like u2039442532. I run half a dozen small sites off of my one account, with different domains and sub-domains and mail. The Control Panel

[jQuery] Re: New plugin - Linked Selects

2007-09-14 Thread Erik Beeson
Looks great. Wanted to let you know that it works on Safari/OSX. --Erik On 9/14/07, Rob D [EMAIL PROTECTED] wrote: Hi, Sometime ago I built my first plugin called linkedSelects and I would finally like to announce it to the list. You can see it in action and download the code here:

[jQuery] Re: Vibrator Plugin

2007-09-13 Thread Erik Beeson
Is this wrong? Maybe, but it's surprisingly fun. Now just replace the animated version with a static single frame when the mouse isn't over it. jQuery: the naughty library that your mother always warned you about. --Erik

[jQuery] Re: Vibrator Plugin

2007-09-13 Thread Erik Beeson
Awesome :) On 9/13/07, Glen Lipka [EMAIL PROTECTED] wrote: Ok refresh. Glen On 9/13/07, Erik Beeson [EMAIL PROTECTED] wrote: Is this wrong? Maybe, but it's surprisingly fun. Now just replace the animated version with a static single frame when the mouse isn't over

[jQuery] Re: timed events

2007-09-13 Thread Erik Beeson
I don't get how mouseover relates to your timed intervals, but I'd say more like option A. You could do something like this (untested): $(window).load(function() { // don't start refreshing until the whole page has loaded setInterval(function() { $('.myItemsToUpdate').each(function()

[jQuery] Re: NEWS: jQuery 1.2 Released

2007-09-10 Thread Erik Beeson
http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality Third paragraph under Removed Functionality says: Additionally, in order to handle the XPath changes another, separate, plugin will has been made available that will handle XPath selector functionality in jQuery. --Erik On

[jQuery] Re: NEWS: jQuery 1.2 Released

2007-09-10 Thread Erik Beeson
It complains at me about logging in and I lose interest. Actually, I hadn't realized that anybody could create an account. I thought it was a web team only thing. --Erik On 9/10/07, John Resig [EMAIL PROTECTED] wrote: Third paragraph under Removed Functionality says: Fixed. Btw, it is a

[jQuery] [OT] CoScripter: super simple firefox automation

2007-09-07 Thread Erik Beeson
Hello all, Not specifically jQuery related, or even JavaScript related, but I thought the community might find it interesting. It's a FireFox addon for automating web site interactions, backed by a wiki/database thing for sharing automation recipes. Ostensibly, it's for things like add your phone

[jQuery] Re: New plugin - Lazy Load

2007-09-07 Thread Erik Beeson
Hi Mika, Great stuff, as always. I'm looking over the source and had a couple of thoughts. It looks like you bind an event handler for each matching element, so 100 images will result in 100 event handlers firing on every scroll. That seems like it wouldn't scale as well as just have one event

[jQuery] Re: How to fade only the background?

2007-09-06 Thread Erik Beeson
Changing opacity affects all child elements. To only fade the background just don't have the foreground be a child of it. You could use absolute or relative positioning or negative margins or floats. --Erik On 9/6/07, howa [EMAIL PROTECTED] wrote: Hi, The following code will fade the logo,

[jQuery] Re: Jquery and Xinha

2007-09-05 Thread Erik Beeson
Define work with. Does something about it keep it from working when using jQuery? --Erik On 9/5/07, voltron [EMAIL PROTECTED] wrote: Hi all! Has anybody gotten Xinha (http://xinha.webfactional.com/) to work wth Jquery? Thanks

[jQuery] Re: Selecting subsequent siblings

2007-09-03 Thread Erik Beeson
Your code didn't come through very well, but maybe you want next()? http://docs.jquery.com/Traversing/next#expr --Erik On 9/2/07, ronnie98 [EMAIL PROTECTED] wrote: Hi all, i have troubles with subsequent siblings selection. Provided the following code:

[jQuery] Re: Selecting subsequent siblings

2007-09-03 Thread Erik Beeson
$('div').each(function(){ var id= $(this).attr('id'); $('span').each(function(){ if(id = $(this).attr('class')){ alert($(this).text()); } }); }); That attr('class') bit will get you in to trouble. I suggest using .is(), and in fact, if you know the

[jQuery] Re: How do i get the hover effect working with fadeIn?

2007-09-03 Thread Erik Beeson
If you use interface, you can animate colors with the regular animate function. Fading is for changing opacity. Maybe you want something like (untested): var originalColor = 'red'; var hoverColor = 'blue'; var duration = 1000; $(...).hover(function() { $(this).animate({backgroundColor:

[jQuery] Re: Using setTimeout()

2007-09-02 Thread Erik Beeson
If ajaxStop is called before the setTimeout callback in ajaxStart is run, active will be false, so the addClass() on line 9 won't get executed. Without this, if ajaxStop ran before the setTimeout callback, the removeClass() would happen before the addClass(), so the class would never get removed.

[jQuery] Re: select two class elements

2007-09-02 Thread Erik Beeson
$('.next,.open') --Erik On 9/2/07, xni [EMAIL PROTECTED] wrote: Hello, I would like to select elements with two class (eg: h5 class=next open. I tried $(.next open) but it failed. Does anyone know how to do it? Thanks in advance. Xavier

[jQuery] Re: Slowing callback function

2007-09-02 Thread Erik Beeson
I assume your selectors are just for example since $('slidediv') isn't a valid selector (unless you have an element like slidediv.../slidediv, which you probably don't have if you're doing HTML). To delay the second effect, you can use setTimeout, like so (untested):

[jQuery] Re: select two class elements

2007-09-02 Thread Erik Beeson
Bah, I know better than that. I had an odd feeling I was doing something wrong. Thanks for correcting it Karl. --Erik On 9/2/07, Karl Swedberg [EMAIL PROTECTED] wrote: On Sep 2, 2007, at 8:25 PM, Erik Beeson wrote: $('.next,.open') --Erik On 9/2/07, *xni* [EMAIL PROTECTED] wrote

[jQuery] Re: AJAX GetElementByID problem

2007-09-01 Thread Erik Beeson
You used to have to manually tell jQuery to evaluate javascript like that using evalScripts, but this is done by default now in 1.1.4. Search for evalScripts on this page: http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-for-12/ --Erik On 9/1/07, Pops [EMAIL PROTECTED]

[jQuery] Re: animate() canceling

2007-09-01 Thread Erik Beeson
Approaching the problem a different way, how about only firing the animation if scrolling has paused for a moment? Maybe something like (untested): $(document).ready(function() { var scrollTimeoutID; var topOffset = 100; $(#label).css('top', topOffset + px); $(window).bind('scroll',

[jQuery] Re: animate() canceling

2007-09-01 Thread Erik Beeson
, easein); }); }); Hope it helps. --Erik On 9/1/07, Erik Beeson [EMAIL PROTECTED] wrote: Approaching the problem a different way, how about only firing the animation if scrolling has paused for a moment? Maybe something like (untested): $(document).ready(function() { var scrollTimeoutID

[jQuery] Re: what is $.param?

2007-08-31 Thread Erik Beeson
I think it's mainly used internally for converting from a JavaScript object to a query string, like: var obj = {param1: 'val1', param2: 'value 2'}; $.param(obj) == param1=val1param2=value%202 --Erik On 8/31/07, mikeyao [EMAIL PROTECTED] wrote: Why can't i find the $.param in the manual?

[jQuery] Re: Help serializing form to array

2007-08-28 Thread Erik Beeson
I think you could replace the parms = ... line with: parms[this.id] = this.value; But I suggest you check out the awesome form plugin: http://www.malsup.com/jquery/form/ --Erik On 8/27/07, bweaverusenet [EMAIL PROTECTED] wrote: Hi. What is the voodoo to build an array for a JSON submit

[jQuery] Re: How optimize $(this).children(span).children(a).html(it works);

2007-08-28 Thread Erik Beeson
Your last guess is the right idea, but not valid javascript syntax. Maybe try: $(this).find(spana).html(it works); If you just want all of the anchors under 'this', you can do: $(this).find('a').html(...); If you know the ID of the element you're looking under, you can do: $('#container

[jQuery] Re: How optimize $(this).children(span).children(a).html(it works);

2007-08-28 Thread Erik Beeson
Also, you could do it XPath style (untested): $(this).find('/span/a').html('it works'); For more info, check out: http://docs.jquery.com/DOM/Traversing/Selectors --Erik On 8/28/07, Erik Beeson [EMAIL PROTECTED] wrote: Your last guess is the right idea, but not valid javascript syntax

[jQuery] Re: Recursive setting of names in jquery

2007-08-28 Thread Erik Beeson
This should do what you want: var letter = 'A'; $([EMAIL PROTECTED]'total + letter + ']).val(...); --Erik On 8/27/07, Brett [EMAIL PROTECTED] wrote: Hello there, I've been loving jQuery so far - so efficient, and a great piece of code to work with. I was wondering if it is possible to

[jQuery] Re: How optimize $(this).children(span).children(a).html(it works);

2007-08-28 Thread Erik Beeson
$(this).children(span).children(a).html(it works); I would have chosen the following $(span a,this).html(it works); I think that isn't quite the same thing. In the following, your suggestion would match 3 anchors, and the OP's would just match the first one: div id=container spana

[jQuery] Re: [Resolved] Re: How optimize $(this).children(span).children(a).html(it works);

2007-08-28 Thread Erik Beeson
Wonderfull! :-) It works with this one: $(this).find('/span/a').html('it works'); Also, remember that beginning with version 1.2, these XPath selectors will be available only with a plugin. :( Oh yeah, in light of that, the recommended way is spana instead of /span/a. It irritates me a

[jQuery] Re: removeClass from *any* element

2007-08-28 Thread Erik Beeson
$('#mydiv *').removeClass('RedText'); See: http://docs.jquery.com/DOM/Traversing/Selectors --Erik On 8/28/07, Shelane [EMAIL PROTECTED] wrote: I apply a class called RedText to items I need to make stand out to the user. I want to be able to globally remove the class from any and all

[jQuery] Re: What's wrong with my syntax?

2007-08-28 Thread Erik Beeson
The syntax for defining an object is: { key1: 'value1', key2: 'value2' } When one of the values in a function, it looks like: { key1: function() {...}, key2: '...' } Your problem is you need a comma before afterFileAppend: --Erik On 8/28/07, juliandormon [EMAIL PROTECTED] wrote:

[jQuery] Re: document ready shortcut and scoping

2007-08-28 Thread Erik Beeson
Why would you want to delay the definition of a function? --Erik On 8/28/07, DaveG [EMAIL PROTECTED] wrote: If I use the jQuery document.ready shortcut to delay the definition of a javascript function test(), what is the correct way to reference test()? This does not work: jQuery (

[jQuery] Re: document ready shortcut and scoping

2007-08-28 Thread Erik Beeson
of those rush things where we had a problem with the DOM not being ready, and ended up blitzing all inline javascript with onready calls. Erik Beeson wrote: Why would you want to delay the definition of a function? --Erik On 8/28/07, DaveG [EMAIL PROTECTED] wrote: If I use the jQuery

[jQuery] Foo Framework, Rapid RIA Dev (for Prototype)

2007-08-27 Thread Erik Beeson
Hello all, I came across an application development thing that's built on Prototype called Foo Framework: http://foo.riiv.net/ It's fairly slick in that it takes valid XHTML and a very little bit of JavaScript to build fairly complex user interfaces. Personally, I think I'd prefer to do a lot

[jQuery] Re: Order of execution with onclick and click

2007-08-27 Thread Erik Beeson
$.(#el1).click(function () { There shouldn't be a . between $ and ( I'm not sure about mixing jQuery events and inline events. I think people generally try to avoid it (like, just call jsfunction1 from your click handler). --Erik

[jQuery] Re: JQuery .load() issue, (user error)

2007-08-27 Thread Erik Beeson
I think you need to have a look over the Ajax docs again: http://docs.jquery.com/Ajax I'm not sure what you're expecting to have happen. What do you mean returns an array to an HTML template? Your $.ajax(...) call will get the contents of get_photos?vehicle_id=... and pass it as a parameter to

[jQuery] Re: A Quick Thank You to the jQuery UI team

2007-08-27 Thread Erik Beeson
Floggings will continue until morale improves. On 8/27/07, Smith, Allex [EMAIL PROTECTED] wrote: Wait till he is finished working on UI before you beat him... Then proceed. -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rey Bango Sent:

[jQuery] Re: attr({'type':'hidden'}) in IE6

2007-08-26 Thread Erik Beeson
Why would you need to do that? --Erik On 8/26/07, Minh [EMAIL PROTECTED] wrote: Getting an error when I tried to set a input attribute to hidden in v1.1.2, v.1.1.3.1 and v1.1.4. Using $ (#inputID).attr({'type':'hidden'}) and $ (#inputID).attr(type,hidden).

[jQuery] Re: attr({'type':'hidden'}) in IE6

2007-08-26 Thread Erik Beeson
Note that showing and hiding form fields (text fields, buttons, etc) should be done with .show() and .hide() (that is, by changing the display or visibility styles of the element), not by trying to change the type property. --Erik On 8/26/07, Erik Beeson [EMAIL PROTECTED] wrote: Why would you

[jQuery] Re: attr({'type':'hidden'}) in IE6

2007-08-26 Thread Erik Beeson
Ajax validation. If it's validated then I need to disabled or hide it so the user can't edit it. Problem with disabled is that when the form is submitted disabled field doesn't get submitted. You can make it read only, and maybe make the text gray so it's a little clearer that it can't be

[jQuery] Re: Why is the + being turned into a space?

2007-08-26 Thread Erik Beeson
The reason + gets turned into a space is because your incoming data is being urldecoded (or unescaped) by PHP, and +, just like %20, gets turned into a space. The reason this is happening to you when you use ajax is because when you pass a String as the data parameter, it is assumed that it's

[jQuery] Re: How to Inject style sheets/.CSS

2007-08-25 Thread Erik Beeson
Right, I just noticed that I forgot to put head in quotes. Here's a little test page: http://erikandcolleen.com/erik/projects/jquery/cssinject/cssinject.html Works in FF2/Mac, Safari 2.0.4, IE6. --Erik On 8/24/07, Pops [EMAIL PROTECTED] wrote: On Aug 25, 1:31 am, Erik Beeson [EMAIL

[jQuery] Re: How to Inject style sheets/.CSS

2007-08-25 Thread Erik Beeson
that it does. --Erik On 8/24/07, Erik Beeson [EMAIL PROTECTED] wrote: Right, I just noticed that I forgot to put head in quotes. Here's a little test page: http://erikandcolleen.com/erik/projects/jquery/cssinject/cssinject.html Works in FF2/Mac, Safari 2.0.4, IE6. --Erik On 8/24/07

[jQuery] Re: How to Inject style sheets/.CSS

2007-08-25 Thread Erik Beeson
Got it, no worries :) Actually, it turns out .html() works on style elements. I wouldn't have expected it to. --Erik On 8/24/07, Glen Lipka [EMAIL PROTECTED] wrote: heh. It's late. Sorry. :) Glen On 8/24/07, Erik Beeson [EMAIL PROTECTED] wrote: Not sure. I wonder what would

[jQuery] Re: How to Inject style sheets/.CSS

2007-08-25 Thread Erik Beeson
() being deprecated? Ok, under 1.1.4 it would of worked for me the first time. Great! Thanks fellas! -- HLS On Aug 25, 2:07 am, Erik Beeson [EMAIL PROTECTED] wrote: Right, I just noticed that I forgot to put head in quotes. Here's a little test page: http://erikandcolleen.com/erik

[jQuery] Re: How to Inject style sheets/.CSS

2007-08-25 Thread Erik Beeson
. Is this just one of few instances of IE problems? -- HLS On Aug 25, 2:18 am, Erik Beeson [EMAIL PROTECTED] wrote: And here's a version that has live updating: http://erikandcolleen.com/erik/projects/jquery/cssinject/cssinject2.html Tested of FF and Safari. I'm not motivated enough to boot up

[jQuery] Re: How to Inject style sheets/.CSS

2007-08-25 Thread Erik Beeson
under FF. Possible a special section in the docs dedicated to compatibile issues need to be section off. With this, people can help in resolving them with patches and update suggestions. -- HLS On Aug 25, 2:58 am, Erik Beeson [EMAIL PROTECTED] wrote: That's what I get for not testing IE6

[jQuery] Re: How to Inject style sheets/.CSS

2007-08-25 Thread Erik Beeson
I'm not aware of any general problems with IE modifying elements in the head. When I said stuff in the head, I didn't really mean to emphasize the head, just that I've experienced problems with both script and style in IE. In particular, dynamic script tags have always worked fine for me - I

[jQuery] Re: jQuery 1.1.4: Faster, More Tests, Ready for 1.2

2007-08-25 Thread Erik Beeson
Couldn't you just use beforeSend to intercept the XMLHttpRequest object and add your own callback handlers to it directly? You'll have to put up with all of the aforementioned memory leak issues, but you'd get access to all of the state changes that you're looking for... --Erik On 8/25/07,

[jQuery] Re: jQuery 1.1.4: Faster, More Tests, Ready for 1.2

2007-08-24 Thread Erik Beeson
I notice the file size has crept up to 21kb from 19kb for 1.1.2. --Erik On 8/24/07, John Resig [EMAIL PROTECTED] wrote: Hi Everyone - jQuery 1.1.4 has just been released! The full details of this release can be found on the jQuery blog:

[jQuery] Re: How to Inject style sheets/.CSS

2007-08-24 Thread Erik Beeson
This seems to work in FF2/Mac: var myCss = 'p { border: 2px solid #faa; }'; $(head).append('style type=text/css' + myCss + '/style'); --Erik On 8/24/07, Pops [EMAIL PROTECTED] wrote: I have a textarea with CSS code and I would like to inject to into the current page Currently, I'm saving

[jQuery] Re: How to Inject style sheets/.CSS

2007-08-24 Thread Erik Beeson
Not sure. I wonder what would happen if you made a style node and appended html into it. Isn't that what I suggested he do? --Erik

[jQuery] Re: how to delay a event?

2007-08-23 Thread Erik Beeson
Check out my response to this question when it came up back in March: http://www.mail-archive.com/[EMAIL PROTECTED]/msg18931.html Hope it helps. --Erik On 8/22/07, james_027 [EMAIL PROTECTED] wrote: hi, I have a small jQuery script, that get some data over the server on every keypress

[jQuery] Re: Testing IE6 and IE7 with Virtual PC

2007-08-22 Thread Erik Beeson
say, I was psyched to see Safari on Windows as I don't need to worry about buying a Mac anymore. Bah. My life has been so much better since I switched to a Mac and run all of my various Windowses and Linuxes in Parallels. --Erik

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Erik Beeson
You do a lot of repetitive selecting. Something like this might help (untested): $('td [EMAIL PROTECTED]').filter('[EMAIL PROTECTED],[EMAIL PROTECTED]') .after('img src=images/buttons/button_minus.gif alt=- /img src=images/buttons/button_plus.gif alt=+ /') .next().bind(click, function() {

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Erik Beeson
heh, I took so long writing my reply, a bunch of other people replied in the mean time. Anyways, I suggest you use firebug (console.time/console.timeEnd) to see how long each version takes. --Erik On 8/21/07, Erik Beeson [EMAIL PROTECTED] wrote: You do a lot of repetitive selecting. Something

[jQuery] Re: Iterating over 1000 items - optimizing jquery

2007-08-21 Thread Erik Beeson
Yes, it looks like he intends to close the first 'after' before starting the second. --Erik On 8/21/07, Dan Eastwell [EMAIL PROTECTED] wrote: Fantastic, thanks Jonathon! One problem - only the minus appears - does the first after call need to be closed before the second? Thanks, Dan.

<    1   2   3   4   >