[jQuery] Re: Noob question about wrapped sets

2009-07-20 Thread nyte999
Thank you Jules! I thought that *might* be the case, but seeing the tell-tail jQuery code in the DHTML was a little confusing to me. But yes, I think I understand it now. "alt" is a normal JavaScript object, NOT jQuery. So when accessing JS objects I must always use the [0]. This also seems to app

[jQuery] Re: Noob question about wrapped sets

2009-07-20 Thread Jules
$("#myElement) returns jQuery object and $("#myElement")[0] returns DHTML object. Here is a sample on how to access alt attribute jQuery $("#myElement").attr("alt") vs DHTML $("#myElement")[0].alt Both code return the same value. Correct me if i am wrong, I think the DHTML version is faster tha

[jQuery] Re: noob question, computability issues with a different date picker

2009-07-09 Thread 刘永杰
can't understand what you say.sorry. 2009/7/9 labbit > > Hello everyone, I tried posting a message before, but it didn't get > posted, so here's another go. > > I'm completely new to jquery development and I wanted to use this date > picker, since it also uses time as well > > http://razum.si/jQ

[jQuery] Re: noob question

2009-01-30 Thread Bohdan Ganicky
Hi bart, let me cite from the spec: "get(): Access all matched DOM elements. This serves as a backwards- compatible way of accessing all matched elements (other than the jQuery object itself, which is, in fact, an array of elements). It is useful if you need to operate on the DOM elements themsel

[jQuery] Re: noob question: loading dynamic content with .load()

2008-11-05 Thread ricardobeat
If the callback runs but the data isn't loaded it's almost certainly a server error. What is in your responseText when it fails? On Nov 4, 10:34 pm, HiddenPhoenix <[EMAIL PROTECTED]> wrote: > im kinda a noob with some of this jquery stuff. esp the ajax stuff so > any help i can get here would be

[jQuery] Re: Noob question about accessing element contents

2008-07-03 Thread ml1
This forum is about using jQuery, thus I assumed that I didn't have to spell out that I indeed of course meant the best jquery way. Thank you for your answer.

[jQuery] Re: Noob question about accessing element contents

2008-07-02 Thread Michael Geary
One answer: Use the technique you mentioned, or any of the techniques the others suggested. They will all work and are all fine to use. Another answer: In code that is performance critical, you may want to bypass all that and go right to the metal. Each of your "item" elements contains a single

[jQuery] Re: Noob question about accessing element contents

2008-07-02 Thread Brian J. Fink
This forum is about using jQuery, so our answers will usually be focused on the best JQUERY way, not necessarily the BEST way. On Jul 2, 11:51 am, ml1 <[EMAIL PROTECTED]> wrote: > I'm trying to find out the "best practice" for getting the contents of > one particular element. I know about the ea

[jQuery] Re: Noob question about accessing element contents

2008-07-02 Thread Brian J. Fink
Let's say you've got the element stored in a variable as an XMLElement, then it would be a simple matter to refer to the jQuery object of the element itself, for example, for variable elem: $(elem,xml).text() On Jul 2, 12:10 pm, "Richard D. Worth" <[EMAIL PROTECTED]> wrote: > $('item', xml).eq(1

[jQuery] Re: Noob question about accessing element contents

2008-07-02 Thread Richard D. Worth
$('item', xml).eq(1).text() - Richard On Wed, Jul 2, 2008 at 11:51 AM, ml1 <[EMAIL PROTECTED]> wrote: > > I'm trying to find out the "best practice" for getting the contents of > one particular element. I know about the each() call. > > As I said I can use ways that seem not so efficient to get

[jQuery] Re: Noob question about accessing element contents

2008-07-02 Thread ml1
I'm trying to find out the "best practice" for getting the contents of one particular element. I know about the each() call. As I said I can use ways that seem not so efficient to get the contents of a single element but I want to know the best way. On Jul 1, 5:20 pm, Mike Alsup <[EMAIL PROTECT

[jQuery] Re: Noob question about accessing element contents

2008-07-01 Thread Mike Alsup
> I am using jquery to parse some xml.  I'm looking for the best > practice to access an elements text contents. > > Let's say my xml looks like this: > > >   >      Hello world! >         >       Goodnight moon! >     > > > I can get a wrapped set of the elements this way: $('items > item', >

[jQuery] Re: Noob Question: Using Selectors after ajax load

2008-06-26 Thread Eric
Thanks a lot for the help! Really appreciate it -Eric

[jQuery] Re: Noob Question: Using Selectors after ajax load

2008-06-25 Thread aldomatic
Take a look at http://brandonaaron.net/docs/livequery/ On Jun 25, 12:22 pm, Eric <[EMAIL PROTECTED]> wrote: > I  am sure this has been answered before, but I could not find it. > > I click on a link which loads a second page into a div using the load > function > > $(document).ready( >          

[jQuery] Re: Noob Question: Using Selectors after ajax load

2008-06-25 Thread Eric Martin
What is the structure of the page you are loading into your div? Could it be that the "new" content is causing problems, like duplicate id's, and that is causing the inability to find elements? On Jun 25, 10:22 am, Eric <[EMAIL PROTECTED]> wrote: > I  am sure this has been answered before, but I

[jQuery] Re: Noob Question: Using Selectors after ajax load

2008-06-25 Thread Richard D. Worth
For a general answer to your question, I recommend starting here: http://docs.jquery.com/Frequently_Asked_Questions#Why_do_my_events_stop_working_after_an_Ajax_request.3F In order to specify code to run after the ajax is complete, you can provide a callback as the final parameter to .load(). This

[jQuery] Re: noob question: how to close current visible in this script

2007-11-30 Thread [EMAIL PROTECTED]
Thanks, that looks like it does the job! Looks quite easy to adapt to my requirements. Cheers, Adrian On Nov 30, 6:41 pm, "Glen Lipka" <[EMAIL PROTECTED]> wrote: > I made this a while back.http://www.commadot.com/jquery/faq.php > > I think it does what you want. You can change the markup to be

[jQuery] Re: noob question: how to close current visible in this script

2007-11-30 Thread Glen Lipka
I made this a while back. http://www.commadot.com/jquery/faq.php I think it does what you want. You can change the markup to be DD/DT pretty easily. Glen On Nov 30, 2007 8:47 AM, [EMAIL PROTECTED] < [EMAIL PROTECTED]> wrote: > > Ladies and Gentlemen, > > Here goes my complete noob question: >

[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-30 Thread Action
Hmm...I replied to you but it didn't post my reply...just a blank response. Anyway, I'm using CakePHP. When a form is submitted it is validated and all of the fields that invalidate are stored into an associative array containing the invalid field and its corresponding error message. Normally, th

[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-30 Thread Wizzud
On Nov 30, 5:55 am, Action <[EMAIL PROTECTED]> wrote: > On Nov 29, 8:02 pm, Wizzud <[EMAIL PROTECTED]> wrote: > > > For example ... ? Sorry, maybe that was a bit too cryptic. Can you provide an example of your PHP data? Can you provide examples of the before/after affected HTML? Can you provide

[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-30 Thread Gordon
Your best approach would be to write a PHP script that serves data in XML or JSON format and then invoke the script from a $.ajax call in jQuery. Then you process the data you get back and insert it into your document as appropriate. Sorry for being vague, but without more information that's the

[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-30 Thread Giovanni Battista Lenoci
There are a lot of way to take data via ajax. I always use this one: Client side: data = param1=foo¶m2=bar $.ajax({ type: "POST", url: "ajax.php", data: data, dataType: "json", success: function(data_result) { FillResult(data_result) } // on success the Fil

[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-29 Thread bingo
hi you can do it this way $document({ $("div#mydiv").html("No of Users: " + ""); }) On Nov 30, 12:55 am, Action <[EMAIL PROTECTED]> wrote: > On Nov 29, 8:02 pm, Wizzud <[EMAIL PROTECTED]> wrote: > > > > > For example ... ? > > > On Nov 29, 9:34 pm, Action <[EMAIL PROTECTED]> wrote: > > > >

[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-29 Thread Action
On Nov 29, 8:02 pm, Wizzud <[EMAIL PROTECTED]> wrote: > For example ... ? > > On Nov 29, 9:34 pm, Action <[EMAIL PROTECTED]> wrote: > > > I have a PHP array of data I want to be able to append to the html > > using jquery and ajax. I want to be able to add different elements of > > the array to

[jQuery] Re: Noob question: How to access a PHP variable and append it to the html?

2007-11-29 Thread Wizzud
For example ... ? On Nov 29, 9:34 pm, Action <[EMAIL PROTECTED]> wrote: > I have a PHP array of data I want to be able to append to the html > using jquery and ajax. I want to be able to add different elements of > the array to different parts of the page. > > How can I go about doing this?

[jQuery] Re: Noob Question - .add() not working in IE?

2007-07-26 Thread webrocker
Hi John, thanks for the info, I'll try that. But it seems that there is another problem, because the part where the .attr("style") thing is checked, depends on the link beiing generated, wich does not happen in IE. The result of the code in IE is Text (which is the "static" html code) in Firefox

[jQuery] Re: Noob Question - .add() not working in IE?

2007-07-25 Thread John Resig
This is going to be an issue: .attr("style") == "display: none;" Up until just the other day, that wasn't working in IE (it's fixed now, and it will be in jQuery 1.1.4). In the meantime I recommend that you do: .is(":hidden") or: .css("display") == "none" --John On 7/24/07, webrocker <[EMAI

[jQuery] Re: Noob Question - .add() not working in IE?

2007-07-25 Thread webrocker
Sorry, it should of course read ".append() not working in IE" in the title of this post, not ".add() not working in IE". :-/

[jQuery] Re: Noob Question - .add() not working in IE?

2007-07-25 Thread webrocker
Sorry, it should of course read ".append() not working in IE" in the title of this post, not ".add() not working in IE". :-/

[jQuery] Re: noob question - load function - dynamic content to slide in place

2007-07-25 Thread Benjamin Sterling
Glad to have pointed you in a good direction. On 7/24/07, tonywhite <[EMAIL PROTECTED]> wrote: Cool - I get it now. I found that my problem was really that the target div for inserting my HTML wasn't set to display:none; to begin with, so animating it to a block state was just not happening.

[jQuery] Re: noob question - load function - dynamic content to slide in place

2007-07-24 Thread tonywhite
Cool - I get it now. I found that my problem was really that the target div for inserting my HTML wasn't set to display:none; to begin with, so animating it to a block state was just not happening. Thanks for your response - I appreciate the group. On Jul 24, 11:08 am, "Benjamin Sterling" <[EMA

[jQuery] Re: noob question - load function - dynamic content to slide in place

2007-07-24 Thread Benjamin Sterling
Tony, try: (for an ID) $('#emptyDiv').load(externalHTML, function(){ $(this).slideDown('slow'); }); (for a class) $('.emptyDiv').load(externalHTML, function(){ $(this).slideDown('slow'); }); On 7/24/07, tonywhite <[EMAIL PROTECTED]> wrote: I'm new to jQuery and can't figure this one out. Ins