Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Klaus Hartl
Andrea Ercolino schrieb: > mea culpa > I made a 'mistake': I put in the loop an accessor $( ".class" ) that caused > the abnormal delay. > After saving the reference $class = $( ".class" ) before entering the loop, > the delay has lowered to 78 milliseconds in IE7 AND 78 milliseconds in > FF1.5.0.

Re: [jQuery] Dismissing Menus

2006-11-12 Thread Blair McKenzie
It depends on the underlying html structure of the menu. The simplest is to use nested lists with the hover(fn,fn) method jQuery provides. hover will trigger the first function when the mouse enters an element, and the second function when it leaves. BlairOn 11/13/06, Alan Gutierrez <[EMAIL PROTECT

Re: [jQuery] click event not working??

2006-11-12 Thread leftend
Aha! Right you are. That makes so much sense I can't believe I didn't think of it before, thanks Erik! I tried moving the code that attaches the events into a seperate function that I call *after* the thickbox is created - but the "click" event only worked on the first element in the thickbox -

[jQuery] Dismissing Menus

2006-11-12 Thread Alan Gutierrez
Using jQuery. First day. After you've displayed a menu, what event would you recommend to dismiss the menu? Should I listen for click and scroll on the document and hide the menu if it is clicked elsewhere? How do I distinguish between clicks inside and outside of the menu body. It's been a long

[jQuery] Interface Sortables onchange property

2006-11-12 Thread Rich Manalang
Hi.  I'm trying to fire off an alert (testing) during a sortables onchange event.  Here's my code:var personalizeHPTabs = function() {    alert('hi... I'm here');};var triggerHPTabsPersonalization = function() {     $('ul.hptabs-sortable').Sortable( {   accept : 'hptab-sort-item',   helperc

Re: [jQuery] What tool is used to compress JQuery?

2006-11-12 Thread Andrea Ercolino
http://dean.edwards.name/packer/ howachen wrote: > > Hi all, > > May I know which tool is used to compress JQuery? > > I found this kind of tool is very useful and can use it? > > Thanks. > > ___ > jQuery mailing list > discuss@jquery.com > http:/

[jQuery] What tool is used to compress JQuery?

2006-11-12 Thread howard chen
Hi all, May I know which tool is used to compress JQuery? I found this kind of tool is very useful and can use it? Thanks. ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Andrea Ercolino
mea culpa I made a 'mistake': I put in the loop an accessor $( ".class" ) that caused the abnormal delay. After saving the reference $class = $( ".class" ) before entering the loop, the delay has lowered to 78 milliseconds in IE7 AND 78 milliseconds in FF1.5.0.8: unbelievable! you can save refer

Re: [jQuery] Appending new option object into existing select in IE

2006-11-12 Thread Brandon Aaron
You can just append straight html to a select element in IE with the latest version of jQuery. $('#propinsi').append('TestTest2'); -- Brandon Aaron On 11/12/06, Donny Kurnia <[EMAIL PROTECTED]> wrote: > In my previous email, I'm asking how to appending new options object > into existing select,

[jQuery] Appending new option object into existing select in IE

2006-11-12 Thread Donny Kurnia
In my previous email, I'm asking how to appending new options object into existing select, and now I've found the solution. This is my previous code: //-- $("#propinsi").change(function () { $(".loader").css("display","inline"); $

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread ashutosh bijoor
HiI know its a bit too late, but nevertheless, there is a plugin that may save you some future headache. The Form De-serialize plugin does what you need and a bit more. You can pass a JSON data structure (hash) to the deserialize plugin and it goes and sets / resets the values of all elements of th

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Michael Geary
> From: Andrea Ercolino > > I have got an array of 50 urls templates, and want to make a > proper url out of each one, adding also a special click, and > then append all these urls to a div in a specific position. > All this should be done many times in a page, "many" could be > 50, just to sa

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Karl Swedberg
On Nov 12, 2006, at 4:57 PM, Dave Methvin wrote: >> Not to complicate matters, but wouldn't "input:hidden" >> do the same thing as "[EMAIL PROTECTED]" ? > > No, input:hidden would retrieve elements with type!="hidden" but with > display:none or visibility:hidden. That's not totally bulletproof,

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Andrea Ercolino
I just put a time start / end probes and found that each 50 times append loop eats up almost 500 milliseconds. Between 465 and 515 on IE7 and between 500 and 575 on FF1.5.0.8 This means that a page with 10 loops, needs 5 seconds to end displaying!! AND I was wrong before, each link is inside 2 di

Re: [jQuery] if/then equivalents in jQuery

2006-11-12 Thread Blair McKenzie
Is there any reason you can't simply do the client-side validation on params before the post and wrap the post in a simple 'if' statement with the result as the condition?Blair On 11/12/06, Bruce MacKay <[EMAIL PROTECTED]> wrote: Hi folks, I'm hoping someone might paint me a picture of how to use

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Andrea Ercolino
I have got an array of 50 urls templates, and want to make a proper url out of each one, adding also a special click, and then append all these urls to a div in a specific position. All this should be done many times in a page, "many" could be 50, just to say something that could be possible, but

Re: [jQuery] Element tagName

2006-11-12 Thread Dave Methvin
> Hmm... Using the same name makes it confusing. > Do I use parens after tagName or not? That part of the answer is easy. The jQuery object only has one named property that you would normally use, .length. You might also use its array-like properties, [0], [1], etc. Everything else is a method

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Dave Methvin
> Not to complicate matters, but wouldn't "input:hidden" > do the same thing as "[EMAIL PROTECTED]" ? No, input:hidden would retrieve elements with type!="hidden" but with display:none or visibility:hidden. That's not totally bulletproof, though, because some parent of the input element could ha

Re: [jQuery] Element tagName

2006-11-12 Thread Dave Methvin
> I'm of the opinon that .attr() should _not_ be getting > properties of an element unless it is to normalize > attributes like disabled and selected that become > properties after render. I don't think that's the way it works today, but I agree it would be good to analyze the current state of

Re: [jQuery] How do I add a js array of jquery objects to a jqueryobject?

2006-11-12 Thread Dave Methvin
> I've got a jquery script where I append (one by one) 50 new > jquery objects to another jquery object, but it's taking way > too much time, so I thought that it could be faster if I make > an array buffer out of them and then aggregate the array > as a whole, but I don't find out how to do it.

Re: [jQuery] dimensions.js breaks height function?

2006-11-12 Thread Brandon Aaron
The dimensions plugin has moved to the plugins repository and the latest version there fixes the height issue. Also the offset method will work without the dimensions plugin. -- Brandon Aaron On 11/12/06, PragueExpat <[EMAIL PROTECTED]> wrote: > > Please advise: I need to use dimensions.js for th

Re: [jQuery] dimensions.js breaks height function?

2006-11-12 Thread Klaus Hartl
PragueExpat schrieb: > Please advise: I need to use dimensions.js for the offset function. However, > since this file overwrites JQuery's height function, I can no longer set > heights (-- i.e. $("p").height("20px"); --). Will the offset function work > on all browsers if I strip out dimensions' h

[jQuery] dimensions.js breaks height function?

2006-11-12 Thread PragueExpat
Please advise: I need to use dimensions.js for the offset function. However, since this file overwrites JQuery's height function, I can no longer set heights (-- i.e. $("p").height("20px"); --). Will the offset function work on all browsers if I strip out dimensions' height function? Does anyone

Re: [jQuery] new jQuery API draft

2006-11-12 Thread Yehuda Katz
No problem :-D It's pretty much identical to the @param attribute.-- YehudaOn 11/12/06, Jörn Zaefferer < [EMAIL PROTECTED]> wrote:Yehuda Katz schrieb:> Great Job! This'll give me some impetus to update Visual jQuery ;) I still need to add the new option element, I'll take a peek at yourstylesheet f

[jQuery] Custom request headers

2006-11-12 Thread Choan C. Gálvez
Hi all. The "server people" I work with insists in the necessity of sending custom headers in AJAX requests, so I've modified my copy of jQuery and opened a bug report (feature request, obviously) which includes a patch proposal. -- Choan

Re: [jQuery] Element tagName

2006-11-12 Thread Brandon Aaron
On 11/11/06, Dave Methvin <[EMAIL PROTECTED]> wrote: > > I couldn't find a way using jQuery to get the > > tagName of an element > > I immediately thought of .attr("tagName") but it didn't work. Some paths > through .attr() get both properties and attributes, others just attributes, > others just p

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Karl Swedberg
On Nov 12, 2006, at 12:26 PM, Jörn Zaefferer wrote: > That is true, but again another ambiguitiy. If you want to select > input > elements of type hidden, :hidden will also select other elements that > are not visible. In that case, you have to fallback to input > [EMAIL PROTECTED] Not to comp

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Jörn Zaefferer
Karl Swedberg schrieb: > By the way, for others on the list who might not know, :hidden can be > used for any element, not just inputs. There is a :visible selector, > too. > That is true, but again another ambiguitiy. If you want to select input elements of type hidden, :hidden will also s

Re: [jQuery] Elements aren't expanding when appending new children

2006-11-12 Thread frando
Yeah, meant display of course, and tried it with display, and used display, and I have no idea why the hell I wrote position here ;) Klaus Hartl-3 wrote: > > frando schrieb: > >> - Changing the css to position: none and then back to position: block >> - changing the position css attribute to

Re: [jQuery] new jQuery API draft

2006-11-12 Thread Jörn Zaefferer
Yehuda Katz schrieb: > Great Job! This'll give me some impetus to update Visual jQuery ;) I still need to add the new option element, I'll take a peek at your stylesheet for that :-) -- Jörn Zaefferer http://bassistance.de ___ jQuery mailing list di

Re: [jQuery] Elements aren't expanding when appending new children

2006-11-12 Thread Michael Geary
One more comment... As you probably figured out from looking at the generated source, the culprit is likely to be the animation code, which sets those unwanted attributes when it animates an item. So one good test would be to remove all animation and see if it generates better code. It will also

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Karl Swedberg
On Nov 12, 2006, at 9:33 AM, Jörn Zaefferer wrote: > I guess the complete documentation for expression needs a good > facelift. > Seems like the input selectors are not documented anywhere. > > There is :input, which selects all types of input element (input, > button, textarea, select). > > Then

Re: [jQuery] Elements aren't expanding when appending new children

2006-11-12 Thread Michael Geary
> I moved "Testnode" up and then moved it to the right, then > used FireBug's Inspect tool to reveal the generated HTML. > This is what I saw: Actually I left out part of it by mistake. Here's the entire UL:

Re: [jQuery] Elements aren't expanding when appending new children

2006-11-12 Thread Michael Geary
When you have a problem like this, your first thought should be to look at the generated HTML using Microsoft's DevToolBar in IE or either FireBug or View Source Chart for Firefox. I moved "Testnode" up and then moved it to the right, then used FireBug's Inspect tool to reveal the generated HTML.

Re: [jQuery] Element tagName

2006-11-12 Thread Michael Geary
> From: Truppe Steven > > my view of the things is a big different. I think jquery > should stay as small as possible so adding functions for > basic dom attributes is a bit overhead i think .. I agree. How do you decide which of the many DOM attributes to turn into jQuery methods? All of them?

Re: [jQuery] Elements aren't expanding when appending new children

2006-11-12 Thread Klaus Hartl
frando schrieb: > - Changing the css to position: none and then back to position: block > - changing the position css attribute to 'table-cell' Did you mean the position *property* or did you mean display? The values you are talking of are for the display property, so if you tried what you wrot

[jQuery] Elements aren't expanding when appending new children

2006-11-12 Thread frando
I'm currently trying to modify an ul-tree dynamically. Moving elements up, down and left is working perfectly. My problem is that, when moving elements right (iow creating a new ul as a child to an existing li), the parent element is not expanding, so the newly created ul is overlapping with oth

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Truppe Steven
Jörn Zaefferer schrieb: > Then there are a selectors for all types of input elements (:text, > :file, :hidden, :password etc. Thanks for the info, is there a way i can look at the possible selectors in the jQuery source ? Also $("#div/form :textarea") does not work and :text only returns all type

Re: [jQuery] new jQuery API draft

2006-11-12 Thread Yehuda Katz
Great Job! This'll give me some impetus to update Visual jQuery ;)-- YehudaOn 11/10/06, Jörn Zaefferer <[EMAIL PROTECTED] > wrote:Hi jQueryians,I'd like to present you a first draft for a new stylesheet for the jQuery API: http://joern.jquery.com/api-draft/cat.xmlThere is still lot's of work to do,

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Jörn Zaefferer
>> While that may work, you should rather use just :text, that is: >> >> $("#editarticle/form :text") >> >> >> > Is this in the documentation somewhere ? I haven't seen these special > selectors like :input :text somewhere mentioned in the docs. > > What other selectors are possible beside

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Truppe Steven
Jörn Zaefferer schrieb: > Truppe Steven schrieb: > >> I also have never seen something like: $("#editarticle/form :input") >> before. Can this be extended like: >> $("#editarticle/form :[EMAIL PROTECTED]'text']") ? >> >> > While that may work, you should rather use just :text, that is: >

Re: [jQuery] Element tagName

2006-11-12 Thread Truppe Steven
Hello, my view of the things is a big different. I think jquery should stay as small as possible so adding functions for basic dom attributes is a bit overhead i think .. best regards, Truppe Steven ___ jQuery mailing list discuss@jquery.com http://jq

Re: [jQuery] new jQuery API draft

2006-11-12 Thread Dan Atkinson
Kinda reminds me of the Java API. Not that that's a bad thing, of course! :) Good stuff! Jörn Zaefferer wrote: > > Hi jQueryians, > > I'd like to present you a first draft for a new stylesheet for the > jQuery API: http://joern.jquery.com/api-draft/cat.xml > > There is still lot's of work

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Jörn Zaefferer
Truppe Steven schrieb: > I also have never seen something like: $("#editarticle/form :input") > before. Can this be extended like: > $("#editarticle/form :[EMAIL PROTECTED]'text']") ? > While that may work, you should rather use just :text, that is: $("#editarticle/form :text") -- Jörn Zaeffe

Re: [jQuery] return this.each

2006-11-12 Thread Oliver Boermans
Michael your explanations are golden! Despite doing quite a bit work with the magic of JQuery - as a non JavaScript expert I have been putting off diving into these depths (such as making a plugin). Just wanted to let you that clear explanations such as this are immensely valuable and empowering t

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread Klaus Hartl
David schrieb: > Mike Alsup schreef: >> Be careful with :input. It selects button elements too and resetting >> the button element's value to "" is probably not what you want to do. >> > To avoid this you could use the button tag. No, the :input selector selects buttons as well, it is a shortc

Re: [jQuery] if/then equivalents in jQuery

2006-11-12 Thread Christof Donat
Hi, I don't have much time to help you now, but better formated code might help others: > $.fn.ajaxSubmitEmail = function(e) { > this.submit(function(){ > var params = {}; > $(this).find("[EMAIL PROTECTED], [EMAIL PROTECTED]'text'], > [EMAIL PROTECTED]'hidden'

[jQuery] if/then equivalents in jQuery

2006-11-12 Thread Bruce MacKay
Hi folks, I'm hoping someone might paint me a picture of how to use jQuery's equivalent of if/then conditional statements - or how to arrange jQuery code to allow for such. I have the following code which collects information from an email form and sends it to the server for processing.  If the f

Re: [jQuery] Loop through all elements of a form

2006-11-12 Thread David
Mike Alsup schreef: > Be careful with :input. It selects button elements too and resetting > the button element's value to "" is probably not what you want to do. > To avoid this you could use the button tag. ___ jQuery mailing list discuss@jquery.c