[jQuery] Re: jQuery for Designers

2008-01-18 Thread McLars
I like the concept. There are other beginner resources, but approaching jQuery from a designer's perspective is a great idea. We need to get more designers onboard. jQuery rocks for the nuts and bolts sort of programming but, unfortunately, it's still catching up on the UI stuff. You do have a ty

[jQuery] Re: jqURL?

2008-01-16 Thread McLars
I've used it with 1.2.1 and didn't have any problems. I didn't try every method, though. Larry Chris J. Lee wrote: > Anyone know if jqURL is up to date with jquery 1.2.2.? > > http://www.oakcitygraphics.com/jquery/jqURL/jqURLdemo.html?var1=1&var2=2&var3=3

[jQuery] Re: jquery remove() not removing

2008-01-08 Thread McLars
Remove() does not delete elements. It only removes them from the DOM. I don't know where they go, but they do hang around somewhere. It's rather annoying, IMO. I have heard this may change in the next release, so removed elements are actually deleted. Does anyone know if this is true? Larry On

[jQuery] Re: looking for plugin that presets values in text box

2008-01-07 Thread McLars
How about just using tooltips (or clueTips), instead of all that custom code for each field? You could even attach the tooltip on a little icon or question mark next to each field. Larry Kevin Scholl wrote: > The plugin toggleVal (written by a colleague of mine) might be of some > interest to

[jQuery] Re: jQuery Tabs - Can I Do This?

2008-01-06 Thread McLars
Klaus Hartl wrote: > Hi Matt, currently external tabs like that are not supported. So far I > was reluctant to implement that 1. to avoid bloat and 2. to me that > seems unexpected behavior to have a tab open in a new window I agree. At a minimum, you might at least add some sort of indication (v

[jQuery] Re: Debug Tools - Charles, DebugBar, Firebug Lite

2008-01-03 Thread McLars
ould be > > fine. > > > Just my two cents. > > > On 1/3/08, Andy Matthews <[EMAIL PROTECTED]> wrote: > > > > Larry... > > > > I'm RIGHT there with you. Better to develop in IE, then move forward into > > > other browsers. Better tha

[jQuery] Re: Debug Tools - Charles, DebugBar, Firebug Lite

2008-01-03 Thread McLars
t; Larry... > > > I'm RIGHT there with you. Better to develop in IE, then move forward into > > other browsers. Better than getting cool code working with a "fringe" > > browser, then finding out it doesn't work correctly in the primary > > browser. > >

[jQuery] Re: Drop Shadow Plugin

2008-01-03 Thread McLars
have found the error - my jquery.js was to old I guess. > I have downloaded teh files from your page and now it works > beautifully! > > Thanks again for your beatiful plugin, Hannes > > On 3 Jan., 16:55, McLars <[EMAIL PROTECTED]> wrote: > > > > > Hannes, > &

[jQuery] Re: Debug Tools - Charles, DebugBar, Firebug Lite

2008-01-03 Thread McLars
IEDeveloperToolbar is somewhat helpful, but kinda flaky. Honestly, though, 99% of the time I just use alert(). I have Firebug, but never use it since I develop on IE. As you said, that's what the vast majority of (and all of our intranet) users are on. I know that is contrary to how many develop,

[jQuery] Re: Drop Shadow Plugin

2008-01-03 Thread McLars
Hannes, I'm sorry, but I don't see anything wrong with your code. I assume you have renamed the plugin files, since they normally begin with "jquery." Otherwise, unless there's a syntax error in there I can't see, it should work just like that. Are you getting any errors at all? Thanks, Larry

[jQuery] Re: Drop Shadow Plugin

2008-01-03 Thread McLars
Jonah, Thanks for the tip, I will think about that for future enhancements. There's currently another thread where someone says the .clone() method is slow too. In either case, I'm not too worried about speed. The plugin is really only intended for adding a few drop shadows to a page, just to add

[jQuery] Re: Cluetip delayed?

2008-01-03 Thread McLars
I don't know anything about the clueTip. Hopefully, someone else can help you with that. Are you sure Ajax is necessary, though? You say you want the application to be snappy (a laudable goal), but it sounds like there is a bit of a speed hit with the database. So, even if you get the Ajax to fir

[jQuery] Re: click event is not listening from .html() output

2008-01-02 Thread McLars
You can't assign an event to an element that does not exist yet, and the "uncheckall_field" does not exist until you click the first link. You could move the event assignment into the function that creates the "uncheckall_field," but then you'd need to reassign the "checkall_field" event later and

[jQuery] Re: BBC Redesign

2008-01-02 Thread McLars
What clock? The clock disappears behind the menu bar when you use a large font size. A few other bits go astray as well, but I've seen much worse. I thought the BBC was for us old folk, anyway. I can't wait until all these young designers start hitting forty. Maybe then someone will actually think

[jQuery] Re: IE7 DOM manipulation and redraws

2008-01-02 Thread McLars
I have seen IE act weird if you try to delete the owner of the event from inside the event. In other words, "element delete thyself" can be a problem. However, since the current jQuery doesn't actually delete the element with .remove(), it just takes it out of the DOM, I don't know if that's your

[jQuery] Re: Help making my code more efficient...

2008-01-02 Thread McLars
Is this for something like a FAQ? If so, a simple way to do this is with a definition list, like so: $("#FAQ dt") .click(function() { $("#FAQ dd").hide(); $(this).next().show(); } ); You'll want to pre-hide your dds, with something like $("#FAQ dd").hide(); in the ready script. If

[jQuery] Re: check if an id exists

2007-12-27 Thread McLars
Yeah, it dawned on me later that the chaining/no error thing was behind the empty array. I think the no errors bit is overhyped, though. Other than the $('#id').hide() example, you aren't going to get very far when a selection fails, and it will make debugging a little weird if you don't throw an

[jQuery] Re: check if an id exists

2007-12-27 Thread McLars
t;0 but there is a better alternative. One case would be where you > want to access a DOM property directly, so you need to know that the element > actually exists before you do that: > > if( $('#id').exists() ) > alert( $('#id')[0].tagName ); > > It woul

[jQuery] Re: check if an id exists

2007-12-26 Thread McLars
ld anyway. Better check the docs. Hmm... > > The docs don't explicitly say what .is() does when the array is empty. > > Better check the source code, and maybe try a couple of test cases to be > > sure." > > > Where if I saw: > > > if( $('#id&#

[jQuery] Re: check if an id exists

2007-12-26 Thread McLars
e, it's important to keep in mind the language's idioms. In the   > case of JS, 0 == false, so if($("#id").length) is a perfectly good   > idiom. > > It's a bit confusing coming from another language (where 0 is true),   > but that's not a good enough r

[jQuery] Re: how to create a function in jquery?

2007-12-26 Thread McLars
First, since all of your functions do the same thing, you do not have to repeat yourself. I would suggest either wrapping all the buttons and textboxes in another element or giving them a class so that they can be selected together, for example: $('#wrapper input').click(...); or $('.buttonCl

[jQuery] Re: general unique id for new append element

2007-12-26 Thread McLars
I believe that is what $.data(element) does, it returns a unique id. However, it only returns an integer number. I would prefer to combine it with a few characters as well, but I suppose that isn't strictly necessary. Byron's function above is a good example of how you could use it. But if you do

[jQuery] Re: check if an id exists

2007-12-25 Thread McLars
$('#id').length is the old school, and most widely used, technique. This is probably the fastest. $('#id').is('*') does make sense semantically (expresses the intent), and is more flexible. Larry On Dec 25, 12:33 am, "Alexey Blinov" <[EMAIL PROTECTED]> wrote: > Yep... my code have size(). Forg

[jQuery] Re: Select elements in order

2007-12-24 Thread McLars
You should be able the use $(":header") selector to select all of the headers simultaneously. I imagine they'd be stored in the document order, but I haven't tried it. Larry On Dec 24, 9:23 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I want to select some items on my page in the order

[jQuery] Re: check if an id exists

2007-12-24 Thread McLars
Well, just to split hairs, the length property returns a number, not a true boolean. You could also use: $('*').is('#myId') or you can reverse it like so: $ ('#myId').is('*') The .is() method does return a boolean. An advantage is that you can apply this to a subset of elements, for example:

[jQuery] Re: general unique id for new append element

2007-12-24 Thread McLars
Just generate a random number with Javascript, and throw in a few characters for good measure. Like maybe the tagName followed by a four or five (you could go higher if you'er paranoid) digit random number. And/or you could use a time stamp of some sort. If you want to go the extra mile, you coul

[jQuery] Re: Announcing jQuery HowTo's

2007-12-22 Thread McLars
me techniques I've worked out that I want to blog > about, but they don't fit in the "HowTo" class... > > I'm not against creating a Tips/Tricks section though. So if we get a > few HowTo's or blogs that would fit there, we'll do so.. :) > > Sha

[jQuery] Re: clicking on row vs. clicking on link in that row

2007-12-22 Thread McLars
You could use the hover() method, instead of the separate mouseover() and mouseout() methods. And you could also use the .toggleClass method instead of the addClass() and removeClass() methods. Larry On Dec 21, 4:55 pm, rolfsf <[EMAIL PROTECTED]> wrote: > I've set up a simple action when a user

[jQuery] Re: Announcing jQuery HowTo's

2007-12-21 Thread McLars
Shawn, Bravo! This is an excellent idea.You know, this is the sort of thing that makes jQuery stand out from the pack of other frameworks/ libraries. Getting started with any framework presents a significant hurdle, and most seem to think publishing an API is sufficient. APIs are necessary for re

[jQuery] Re: iterating functionality

2007-12-21 Thread McLars
Can you give us a sample of what you're doing now? I would imagine you just need one procedure, probably when the page loads, that loops through the table, hiding the second rows and assigning a handler to each of the links in the first rows. The handler would find the parent row () for the clicke

[jQuery] Re: Best technique? .load() and div height...

2007-12-19 Thread McLars
I think the delay is more than a new member thing. The list is nearly unusable lately. I have seen more double posts (people probably don't see their questions and resubmit them) and many threads are confusing because the posts are delayed so long (people are answering questions that have already

[jQuery] Re: Converting XML to a string with jQuery

2007-12-19 Thread McLars
I don't know about jQuery, I doubt it, but apparently IE does have an XMLSerializer. Of course, the syntax would be different. You can try searching for "jscript xmlserializer" and see if that yields anything useful. But then you'd probably be out of luck with Safari, Opera, etc. You might end up

[jQuery] Removing elements

2007-12-19 Thread McLars
I have a quick, and stupid, question. When I use the remove() method, elements are removed from the DOM, but they still seem to be hanging around in memory. How do I completely destroy an element? Thanks, Larry

[jQuery] Drop Shadow Plugin

2007-12-14 Thread McLars
I added a new Drop Shadow plugin to the site yesterday. It creates soft drop shadows underneath nearly any element, like text headings, content containers, and images (including transparent GIFs). It has several options, and you can experiment with it on my demo page at http://eyebulb.com/dro

[jQuery] Drop Shadow Plugin

2007-12-14 Thread McLars
I have a new plugin that will create soft drop shadows on elements. It works on text as well as block elements, and has options for the offset, blur, opacity, and color. Please take a look at the demo page (http://eyebulb.com/dropshadow) and let me know what you think. You may download the plugin

[jQuery] Re: Creating an empty jQuery collection

2007-12-13 Thread McLars
Perfect! Thank you! On Dec 12, 11:05 pm, "Aaron Heimlich" <[EMAIL PROTECTED]> wrote: > var emptyJQueryCollection = jQuery([]);

[jQuery] Creating an empty jQuery collection

2007-12-12 Thread McLars
Is there an elegant way to create an empty jQuery collection? The only way I've figured out to do it is like this: var jqObjects = $(this).not(this); This seems rather stupid to me. There should be a simpler way. I need this so that I can fill it with jQuery objects that I create inside a loop,

[jQuery] Re: Returning a new collection from a method

2007-12-12 Thread McLars
}) ); > > }; > > or > > $.fn.myMethod = function() { > var returnObject = []; > this.each(function() { > // var newElement = something based on 'this' > // returnObject.push(newElement); > }); > return this.pushStack(ret

[jQuery] Returning a new collection from a method

2007-12-11 Thread McLars
I have a plugin that needs to return a different jQuery collection than the one it was passed. In other words, each of the elements passed in the original collection will create a new element, and I want to return the new elements instead of the originals. So, instead of something like this: $.f