[jQuery] Re: Finding ID within Ajax response

2009-04-13 Thread Nic Luciano
n using find(), just select by ID as a subset of the DOM node.. alert($(html).find("#test") becomes alert($("#test", html)); Hope some of this helps... cheers! Nic Luciano Senior Web Developer @ AdaptiveBlue http://www.twitter.com/nicluciano http://www.linkedin.com/in/niclucian

[jQuery] Re: Accessing a JSON property from an unknown variable?

2009-02-13 Thread Nic Luciano
Oh wow, I didn't realize JSON would act like an associative array in that way... Thanks guys! On Fri, Feb 13, 2009 at 7:10 PM, Josh Nathanson wrote: > > foo[fooProp] // returns "barVal" > > Is that what you mean? > > -- Josh > > > > -Original Message- > From: jquery-en@googlegroups.com [

[jQuery] Re: Removing all styles from an element-

2009-02-12 Thread Nic Luciano
I considered it, but because of the ambiguity I run into I just need to specify every single Css property... Thought there might be something clever I could do with jquery but pobably not... Thanks Sent from my iPhone On Feb 12, 2009, at 12:08 AM, Ricardo Tomasi wrote: You could a u

[jQuery] Re: $.getScript - passing the response.

2009-02-12 Thread Nic Luciano
Close but You should be using .get() for this, with an onsuccess callback (also see datatype). .getscript is solely for loading javascript files to execute. Sent from my iPhone On Feb 11, 2009, at 11:13 PM, "brian.overl...@gmail.com" > wrote: I'm using $.getScript to get XML from a rem

[jQuery] Re: Status Codes => docs

2009-02-11 Thread Nic Luciano
everything went OK). Data type is the format of the data you are expecting to return (html for plain html to insert into your document, json for js objects, etc)... Nic Luciano http://www.twitter.com/nicluciano http://www.linkedin.com/in/nicluciano On Wed, Feb 11, 2009 at 8:52 PM, Tim Johnson wro

[jQuery] Re: how to include JQuery from a page loaded by AJAX?

2009-02-11 Thread Nic Luciano
You should think about using jQuery's ajax ( http://docs.jquery.com/Ajax/jQuery.ajax#options) while you're at it... if you did, you could attach your .corners() function to ajaxComplete ( http://docs.jquery.com/Ajax/ajaxComplete#callback) so you wouldn't have to include it in every call. Glad to he

[jQuery] Re: A small incompatibility about selector on Jquery 1.3.1

2009-02-11 Thread Nic Luciano
Hey Jack- I think this is the right group for these issues:... :) http://groups.google.com/group/jquery-dev Nic Luciano http://www.twitter.com/nicluciano http://www.linkedin.com/in/nicluciano On Wed, Feb 11, 2009 at 9:53 PM, jack wrote: > > The following works on before Version: &g

[jQuery] Re: how to include JQuery from a page loaded by AJAX?

2009-02-11 Thread Nic Luciano
PS - Again, I don't even know for sure if this is the issue. :) On Wed, Feb 11, 2009 at 10:32 PM, Nic Luciano wrote: > Hey Davis... > > So, the issue is that your calling corners once, it executes on all the > elements currently IN the document. When you load new elements via

[jQuery] Re: how to include JQuery from a page loaded by AJAX?

2009-02-11 Thread Nic Luciano
Hey Davis... So, the issue is that your calling corners once, it executes on all the elements currently IN the document. When you load new elements via AJAX, they are appended AFTER corners has already done it's magic. So where it says... if (xmlHttp.readyState == 4){ var res = xmlHttp.respo

[jQuery] Re: how to include JQuery from a page loaded by AJAX?

2009-02-11 Thread Nic Luciano
You need to be executing the Javascript in the callback of your AJAX function, NOT in the head of the document you are loading. Aside, if you are using jQuery anyway you should consider using it's own AJAX functions... On Wed, Feb 11, 2009 at 10:06 PM, Davis wrote: > > hello, > > first, i just

[jQuery] Re: Finding the last sibling.

2009-02-11 Thread Nic Luciano
$("div :last-child"); (or this wacky way I tried before I learned CSS selectors $("div").children()[$("div").children().size() - 1])...) Nic Luciano http://www.twitter.com/nicluciano http://www.linkedin.com/in/nicluciano On Wed, Feb 11, 2009 at 9:49 PM, Ri

[jQuery] Re: how to include JQuery from a page loaded by AJAX?

2009-02-11 Thread Nic Luciano
ta in your success callback, just re-execute your .corners() function. If that's not right it should point you in the right direction... cheers! Nic Luciano http://www.twitter.com/nicluciano http://www.linkedin.com/in/nicluciano On Wed, Feb 11, 2009 at 9:35 PM, Davis wrote: > >

[jQuery] Re: how to differentiate between "click" and "dragend" events?

2009-02-11 Thread Nic Luciano
Try starting a timer on mouse down, and only register the click event if the timer is less than x milliseconds. The fringe case for this would be users who click for seconds, or who drag in milliseconds. I'm .positive. this is not the best possible way to handle this, but it could be a la

[jQuery] Re: Click Links in the Nnavigation Bar

2009-01-30 Thread Nic Luciano
What exactly are you trying to do, what is the issue? Maybe just preference here (and I'm also just guessing what you're asking) but I don't see a reason not to put the events on the elements themselves $("ul li a").click(function() { $(this).parent().parent().find(".active").removeClass("

[jQuery] Re: var divcount = $("div#div2").length; --- returns wrong value

2009-01-19 Thread Nic Luciano
Hey Bartee, I think your problem is that .length() returns the number of elements in the object you're acting on. In you're case, there's only one object (a text node). So, it should return one. What you're actually looking for is $("div#div2").text().length; On Mon, Jan 19, 2009 at 12:25 PM, bar

[jQuery] Re: rating using thumbs up thumbs down.

2009-01-18 Thread Nic Luciano
It's unlikely there's a plugin to do what you want to do since javascript is client side, and saving to any sort of database would require at least some web service. On Sun, Jan 18, 2009 at 12:46 PM, Pragan wrote: > > Hi, > > I am looking to implement a rating system using thumbs up thumbs down.

[jQuery] Re: jQuery in a Firefox Extension...

2009-01-18 Thread Nic Luciano
Anyone? I was looking forward to using jQuery in the extension but I might have to do without... :[ On Fri, Jan 16, 2009 at 3:47 PM, Nic Luciano wrote: > Hm, that makes sense. So, I suppose I could do something like > > jQuery.noConflict(); > var doc = window.content.document; &

[jQuery] Re: How select first link??

2009-01-17 Thread Nic Luciano
> > > > --Karl > > > > ____ > > Karl Swedbergwww.englishrules.comwww.learningjquery.com > > > > On Jan 17, 2009, at 3:39 PM, Nic Luciano wrote: > > > > > That's true, but that's exactly ho

[jQuery] Re: How select first link??

2009-01-17 Thread Nic Luciano
That's true, but that's exactly how it's supposed to function. On Sat, Jan 17, 2009 at 3:35 PM, jQuery Lover wrote: > > No he is not! > > Suppose you have this scenario: > > > >Home >Rules > Pilots > Briefing > IGC

[jQuery] Re: How select first link??

2009-01-17 Thread Nic Luciano
Simple correction, I meant the first child of it's parent*. Just in case it wasn't clear. Cheers- Nic http://www.twitter.com/nicluciano On Sat, Jan 17, 2009 at 2:05 PM, Nic Luciano wrote: > The reason it's not working is you're using the first-child selector. What >

[jQuery] Re: How select first link??

2009-01-17 Thread Nic Luciano
The reason it's not working is you're using the first-child selector. What you're doing by using that is selecting every anchor that is the first parent of it's child (which is all of them since they lie immediately under a list item). The selector you want to be using is just first (a:first), whic

[jQuery] Re: Solution To Many Of Your CSS Nightmares!

2009-01-16 Thread Nic Luciano
This might work for Superfish but isn't it also a possibility by doing this you could do the exact opposite of what you're trying to accomplish, as this could also override any other third party CSS you're trying to use? While I guess it's not technically incorrect, there's no reason to include !im

[jQuery] Re: jQuery in a Firefox Extension...

2009-01-16 Thread Nic Luciano
Hm, that makes sense. So, I suppose I could do something like jQuery.noConflict(); var doc = window.content.document; jQuery("#id", doc); Which would solve the issue that jQuery doesn't live in the HTML anymore (and lives in the browser). But how would this work on .ajax functions? Do I have