[jQuery] Re: Newbie Question: Finding and manipulating an element

2010-03-02 Thread Greg Tarnoff
Aaron, Not sure if you caught it, but I screwed up some quotes in my code snippet (stupid iphone). It should be: $('ul.foo li ul').addClass(bar); On Mar 1, 9:25 am, Aaron Johnson aaron.mw.john...@gmail.com wrote: Greg, Nathan, Thanks very much for your help! On 1 March 2010 14:58, Nathan

[jQuery] Re: Newbie Question: Finding and manipulating an element

2010-03-01 Thread Greg Tarnoff
This will add the class for you. Put it in the document ready function if you want it on page load or in whatever function you want to call it from. $('ul.foo li 'ul).addClass(bar); On Mar 1, 5:06 am, Aaron Johnson aaron.mw.john...@gmail.com wrote: Hello... I have an unordered list containing

[jQuery] Re: Newbie Question

2009-10-14 Thread brian
I don't know what to make of that Coldfusion code (makes me long for Perl) but what I would do is display the msg div then use $.ajax() to send a request to the server. Use the 'success' callback function to then hide the msg div when your server-side code is done. On Wed, Oct 14, 2009 at 4:17

[jQuery] Re: Newbie Question

2009-08-04 Thread Liam Potter
script type=text/javascript function _ajaxInit() { $(a.group).fancybox( { 'overlayShow': true }); }); window.onload = function () { $('.sliderGallery').each(function(){ var id_parts = $(this).attr('id').split('_'); var id = id_parts[id_parts.length - 1];

[jQuery] Re: Newbie Question

2009-08-04 Thread Dave Maharaj :: WidePixels.com
: [jQuery] Re: Newbie Question script type=text/javascript function _ajaxInit() { $(a.group).fancybox( { 'overlayShow': true }); }); window.onload = function () { $('.sliderGallery').each(function(){ var id_parts = $(this).attr('id').split('_'); var

[jQuery] Re: Newbie Question

2009-08-04 Thread Liam Potter
'); }); }); return false; }); Dave -Original Message- From: Liam Potter [mailto:radioactiv...@gmail.com] Sent: August-04-09 12:50 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Newbie Question script type=text/javascript function _ajaxInit() { $(a.group).fancybox

[jQuery] Re: Newbie Question

2009-08-04 Thread Dave Maharaj :: WidePixels.com
[mailto:radioactiv...@gmail.com] Sent: August-04-09 1:19 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Newbie Question yeah, use the modified script and add _ajaxInit(); to the callback; $('a.profile_data').click(function(){ var url = $(this).attr('href'); //alert(url

[jQuery] Re: Newbie Question

2009-08-04 Thread Liam Potter
happening. dave -Original Message- From: Liam Potter [mailto:radioactiv...@gmail.com] Sent: August-04-09 1:19 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Newbie Question yeah, use the modified script and add _ajaxInit(); to the callback; $('a.profile_data').click(function

[jQuery] Re: Newbie Question

2009-08-04 Thread Dave Maharaj :: WidePixels.com
? Dave -Original Message- From: Liam Potter [mailto:radioactiv...@gmail.com] Sent: August-04-09 1:34 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Newbie Question Have you updated the original script to my one? script type=text/javascript function _ajaxInit() { $(a.group

[jQuery] Re: Newbie Question

2009-08-04 Thread Liam Potter
: [jQuery] Re: Newbie Question Have you updated the original script to my one? script type=text/javascript function _ajaxInit() { $(a.group).fancybox( { 'overlayShow': true }); }); window.onload = function () { $('.sliderGallery').each(function

[jQuery] Re: Newbie Question

2009-08-04 Thread Dave Maharaj :: WidePixels.com
that into a div on another page it stops working. That's where I am stuck -Original Message- From: Liam Potter [mailto:radioactiv...@gmail.com] Sent: August-04-09 2:01 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Newbie Question Do you have an online example so I can get

[jQuery] Re: newbie question.

2009-07-27 Thread James
This: (function() { do some stuff } )(); is known as a closure. It just runs once and it does not leave around any global variables (that is, if you also don't set any inside this function also). Compared to this: function doSomething() { // do some stuff }; The doSomething variable will exist

[jQuery] Re: newbie question.

2009-07-27 Thread Michael Geary
That's a great explanation, James. I hope you won't mind if I nitpick a point of terminology. The code you were talking about is not a closure: (function() { /* do some stuff */ })(); As you described, the advantage of this code is that any variables you define inside the function won't

[jQuery] Re: newbie question.

2009-07-27 Thread James
No problem, Michael. Thanks for the clarification regarding an anonymous function and a closure, and the detailed explanation for closures. I'll give some related resources a good read on closures. :) On Jul 27, 1:46 pm, Michael Geary m...@mg.to wrote: That's a great explanation, James. I hope

[jQuery] Re: newbie question.

2009-07-27 Thread RobG
On Jul 28, 5:53 am, James james.gp@gmail.com wrote: This: (function() { do some stuff } )(); is known as a closure. You have a warped view of a closure. It is an example of the module pattern, which can create closures, but doesn't necessarily do so. URL:

[jQuery] Re: newbie question.

2009-07-25 Thread Aleksey
Well, it's a common pattern that is used when creating a jQuery plugin. A common problem doing that is the use of a '$' sign, because other frameworks use it too as well. I didn't try to use some frameworks simultaneously yet, so I didn't encountered that problem by myself. One of the way is to

[jQuery] Re: Newbie Question....

2009-07-17 Thread brian
Do you want the form to submit via AJAX? Have a look at the form plugin. http://malsup.com/jquery/form/ On Fri, Jul 17, 2009 at 1:47 PM, raisputingreg.djr...@gmail.com wrote: Hello, I have just discovered jQuery and it looks cool. I used the jQuery UI builder at ui.jquery.com to build the

[jQuery] Re: Newbie Question....

2009-07-17 Thread Greg Evans
That looks great, and I think it is just what I need. I want to clarify however, this shows to comment.php, but something like comment.pl should work equally as well correct? On Jul 17, 2009, at 11:28 AM, brian wrote: Do you want the form to submit via AJAX? Have a look at the form

[jQuery] Re: Newbie Question....

2009-07-17 Thread Theodore Ni
Yes, your action script can be anything. Ted On Fri, Jul 17, 2009 at 2:40 PM, Greg Evans greg.djr...@gmail.com wrote: That looks great, and I think it is just what I need. I want to clarify however, this shows to comment.php, but something like comment.pl should work equally as well

[jQuery] Re: Newbie question

2009-07-02 Thread Charlie
http://docs.jquery.com/Selectors look at the last item in "Basics" , "Selector1,Selector2" and click on it to see the example getting familiar with the jquery website categories of "selectors, traversing, manipulation etc " is probably the #1 best tool for learning jquery. Alexandru

[jQuery] Re: Newbie question

2009-07-02 Thread Alexandru Adrian Dinulescu
Hello. Damn i'm so silly, i looked over the website and i totally didnt see that. Thanks a lot for pointing it Best Regards On Thu, Jul 2, 2009 at 2:17 PM, Charlie charlie...@gmail.com wrote: http://docs.jquery.com/Selectors look at the last item in Basics , Selector1,Selector2 and

[jQuery] Re: Newbie question

2009-07-02 Thread NauticalMac
$(selector1, selector2).click(function(){}) http://docs.jquery.com/Selectors/multiple#selector1selector2selectorN e.g. $('td, th').click(function(){alert(clicked table cell);}); Colin On Jul 2, 6:09 am, Alexandru Adrian Dinulescu alex.d.a...@gmail.com wrote: Hello. I am trying to do something

[jQuery] Re: Newbie question on selectors

2009-06-03 Thread James
$(a[class^=edit_]).click(...); This is saying: all a with class that begins with 'edit_'. http://docs.jquery.com/Selectors On Jun 3, 8:20 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have a page with 6 links that each have a unique class ; edit_profile edit_preferences

[jQuery] Re: Newbie question on selectors

2009-06-03 Thread Dave Maharaj :: WidePixels.com
Perfect... Thanks for your help. Greatly appreciated. Dave -Original Message- From: James [mailto:james.gp@gmail.com] Sent: June-03-09 3:55 PM To: jQuery (English) Subject: [jQuery] Re: Newbie question on selectors $(a[class^=edit_]).click(...); This is saying: all

[jQuery] Re: Newbie question on selectors

2009-06-03 Thread James
:: WidePixels.com d...@widepixels.com wrote: Perfect... Thanks for your help. Greatly appreciated. Dave -Original Message- From: James [mailto:james.gp@gmail.com] Sent: June-03-09 3:55 PM To: jQuery (English) Subject: [jQuery] Re: Newbie question on selectors $(a[class

[jQuery] Re: Newbie question on selectors

2009-06-03 Thread Dave Maharaj :: WidePixels.com
Sounds good! Will keep that in mind, but its working perfect. Thanks, Dave -Original Message- From: James [mailto:james.gp@gmail.com] Sent: June-03-09 4:51 PM To: jQuery (English) Subject: [jQuery] Re: Newbie question on selectors Sorry, I forgot to mention that this would

[jQuery] Re: Newbie question on selectors

2009-06-03 Thread Andrew
you can try something like this $(a[class^=edit]).click(function(){ var url_id = $(this).attr('href'); do stuff.. }); On Jun 3, 11:20 am, Dave Maharaj :: WidePixels.com d...@widepixels.com wrote: I have a page with 6 links that each have a unique class ; edit_profile edit_preferences

[jQuery] Re: Newbie question on selectors

2009-06-03 Thread Karl Swedberg
appreciated. Dave -Original Message- From: James [mailto:james.gp@gmail.com] Sent: June-03-09 3:55 PM To: jQuery (English) Subject: [jQuery] Re: Newbie question on selectors $(a[class^=edit_]).click(...); This is saying: all a with class that begins with 'edit_'. http://docs.jquery.com

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-26 Thread colin_e
Just to finish this one off, I discovered my problem in IE6 was nothing to do with the jquery search operation we were discussing. As I was working on the code I had added an object initialisation above the line in question that had an extra comma at the end, as in- var frames= {

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-26 Thread Jason Persampieri
Excellent! Glad to see you figured that one out. Rest assured that *every* web developer has pulled out hair related to that particular issue. Fortunately, in many editors today, you can run a tool called 'jslint' that does a simple syntax check for you. In my editor (TextMate), I actually

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-25 Thread Jason Persampieri
Certainly... you're really not all that far off at all... let me just point out a couple of things. 1) It's :first-child, not :first. 2) inside the loop, the variable - this - is a reference to the DOM li node. Hence, to get the jQuery object for that node, use $(this) (note the lack of

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-25 Thread colin_e
That is very, very helpful, thanks! I knew I hadn't found the correct way to say constrain the search to children of 'this', now I know. To be honest I think i'm still unclear on the real difference between the vanilla Javascript 'this' and the jquery '$(this)'. For example I think that I could

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-25 Thread Jason Persampieri
re: this vs $(this) - this = DOMNode $(this) = [DOMNode] (ie, an array containing the single element, DOMNode) that also happens to have lots of nifty methods like 'children', 'find' and 'animate'. The jQuery version should work in pretty much all browsers though... the compatibility layer is

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-25 Thread colin_e
I hate to say this but i'm using IE6 for compatibility testing because that (like it or not) is still our organisation's standard browser... :-} On May 25, 2:03 pm, Jason Persampieri papp...@gmail.com wrote: re: this vs $(this) - this = DOMNode $(this) = [DOMNode] (ie, an array containing the

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-25 Thread colin_e
In fact I tried an alert() to see what the code was doing, and it now looks as if it's not running at all. Don't you just love IE6? On May 25, 4:49 pm, colin_e colin.ev...@nhs.net wrote: I hate to say this but i'm using IE6 for compatibility testing because that (like it or not) is still our

[jQuery] Re: Newbie question- declarative selectors inside procedural code

2009-05-25 Thread kiusau
On May 25, 3:44 am, Jason Persampieri papp...@gmail.com wrote: Certainly... you're really not all that far off at all... let me just point out a couple of things. Very nice presentation! It is likely that many novice users of jQuery will be able to benefit from it. Please do respond to the

[jQuery] Re: Newbie question about toggle.

2009-05-21 Thread ryan.j
sounds like you could jsut use an inline anchor, with the JS being executed in the onclick event On May 21, 8:11 am, Lacrima lacrima.ma...@gmail.com wrote: Hello! I think very simple question, but I am very new to jquery... For example, I have the next code:         $('#info').hide();    

[jQuery] Re: Newbie question about toggle.

2009-05-21 Thread Lacrima
Hi Ryan, Thanks for reply! I tried to use anchor, but it doesn't work: $('#info').hide(); $('a#show_hide_info').click(function(){ $('#info').toggle(); }); a id=show_hide_info href=#fooShow/hide info/a !-- a lot of html tags here -- div id = infoa name =

[jQuery] Re: Newbie Question... Appending multiple items, with the same span name

2009-05-13 Thread Abdullah Rubiyath
Hey there, You could try the following: $(document).ready(function() { $(ul li).each(function() { var thisName = $('.name', this).text(); // get the content inside '.name' class of this element $(this).append('span class=additionala href=addinfo.php'+ thisName +'s additional Info/a/span

[jQuery] Re: Newbie Question - Show/Hide on a:link

2009-04-17 Thread Andy Matthews
Try using toggle instead: ${a.welcomenav).toggle(function(){ $(#welcome).show(); return false; },function(){ $(#welcome).hide(); return false; }); -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of

[jQuery] Re: newbie question

2009-04-07 Thread Ronz
Hi, Rick. Here's a quote to my hosting news group that 'splains' what has happened since yesterday. Maybe you could comment on the latter portion if you have time. TIA.Ron quote to newsgroup It turns out that what I downloaded from jQuery ended up with a bunch of line feeds in it...my

[jQuery] Re: newbie question

2009-04-07 Thread Jonathan
PM To: jQuery (English) Subject: [jQuery] Re: newbie question $ is simply an alias to jQuery(). jQuery.noConflict() removes the $ alias so other frameworks don't throw a fit. $bfa = jQuery.noConflict() simply assigns $bfa to jQuery(). The $ tends to confuse people at first but it's just

[jQuery] Re: newbie question

2009-04-07 Thread Jonathan
(), right? Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jonathan Sent: Tuesday, April 07, 2009 3:08 PM To: jQuery (English) Subject: [jQuery] Re: newbie question $ is simply an alias to jQuery(). jQuery.noConflict

[jQuery] Re: newbie question

2009-04-07 Thread Jonathan
thing...perhaps someone else has more to offer in terms of explanation. hth, Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Ronz Sent: Tuesday, April 07, 2009 1:21 PM To: jQuery (English) Subject: [jQuery] Re: newbie question

[jQuery] Re: newbie question

2009-04-07 Thread Rick Faircloth
Thanks for clarifying, Jonathan! Rick -Original Message- From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On Behalf Of Jonathan Sent: Tuesday, April 07, 2009 3:34 PM To: jQuery (English) Subject: [jQuery] Re: newbie question Also, you should only ever have to call

[jQuery] Re: newbie question

2009-04-07 Thread Rick Faircloth
[mailto:jquery...@googlegroups.com] On Behalf Of Ronz Sent: Tuesday, April 07, 2009 1:21 PM To: jQuery (English) Subject: [jQuery] Re: newbie question Hi, Rick. Here's a quote to my hosting news group that 'splains' what has happened since yesterday. Maybe you could comment on the latter portion if you have

[jQuery] Re: newbie question

2009-04-06 Thread Rick Faircloth
Hi, Ron... Assuming that you have your jQuery source file jquery-1.3.2.min.js in the same directory as the page it's running on, do you have this in the head section of your document? script type=text/javascript src=jquery-1.3.2.min.js/script If you do, then also post your jQuery code and your

[jQuery] Re: Newbie Question: get id from A tag

2009-03-24 Thread weidc
$(.clickme).attr(id); On 24 Mrz., 14:03, Jesse cdrp...@gmail.com wrote: Hello, I am not good at js. I want to get the id from A tag. E.g. a href=/comment.php class=clickme id=1234link/a I need the value 1234 from the code above, but dont know how to do it. Please help. Thanks.

[jQuery] Re: Newbie Question: get id from A tag

2009-03-24 Thread Jesse
ok, got it. thanx weidc, On Mar 24, 9:44 pm, weidc mueller.juli...@googlemail.com wrote: $(.clickme).attr(id); On 24 Mrz., 14:03, Jesse cdrp...@gmail.com wrote: Hello, I am not good at js. I want to get the id from A tag. E.g. a href=/comment.php class=clickme id=1234link/a I need

[jQuery] Re: Newbie question - downloading jQuery

2009-02-06 Thread brian
What did you download? There is the main jquery library (plain, minified, etc.) and there's all the UI stuff. If you want to use the UI widget/effect libraries you'll have to get them separately. However, you can get them as prepackaged bundles based on the things you want:

[jQuery] Re: Newbie question

2009-01-05 Thread Richard D. Worth
See http://docs.jquery.com/CSS Specifically http://docs.jquery.com/CSS/offset http://docs.jquery.com/CSS/position http://docs.jquery.com/CSS/scrollTop http://docs.jquery.com/CSS/scrollLeft - Richard On Mon, Jan 5, 2009 at 2:11 PM, saiful.ha...@gmail.com saiful.ha...@gmail.com wrote: hi

[jQuery] Re: Newbie question: how to reference an element via XML attribute.

2008-10-17 Thread JFQueralt
Hi, Mike. Thanks for the hint. Will try it tonite at home :-) Jean On Oct 16, 2:28 am, Mike Alsup [EMAIL PROTECTED] wrote: Second, I´ve found a solution using the DOM while it works is far from being jQuery pure code:         //Iterate among all retrieved items.         $('item',

[jQuery] Re: Newbie question: how to reference an element via XML attribute.

2008-10-15 Thread JFQueralt
Hi again. First of all, sorry for the double posting; just a mistake. Second, I´ve found a solution using the DOM while it works is far from being jQuery pure code: //Iterate among all retrieved items. $('item', xml).each(function(i){ //Retrieve the Node of the

[jQuery] Re: Newbie question on positioning images

2008-09-12 Thread BB
Is the gif visible when you try to get it's height? If not try this: var height = $('#wait_also').css(visibility, visible).height(); $('#wait_also').css(visibility, hidden); On 12 Sep., 12:23, Kevin Thorpe [EMAIL PROTECTED] wrote: Sorry, this is very simple I think but I can't fathom it out.

[jQuery] Re: NEWBIE Question re span and form elements

2008-08-29 Thread Peter Bailey
Wow, that sure is nice and concise. Thanks Richard On Aug 29, 12:45 am, Richard D. Worth [EMAIL PROTECTED] wrote: You could do something like this: $(#mySpan).find(:input).removeAttr(checked).val().hide() - Richard Richard D. Worthhttp://rdworth.org/ On Thu, Aug 28, 2008 at 10:11 AM,

[jQuery] Re: NEWBIE Question re span and form elements

2008-08-28 Thread Richard D. Worth
You could do something like this: $(#mySpan).find(:input).removeAttr(checked).val().hide() - Richard Richard D. Worth http://rdworth.org/ On Thu, Aug 28, 2008 at 10:11 AM, Peter Bailey [EMAIL PROTECTED] wrote: Hi there. I recently discovered jQuery and it appears to be an excellent

[jQuery] Re: newbie question about assigning a varialbe for use in a selector statement

2008-07-12 Thread Karl Swedberg
I think you can do this a little differently to achieve the effect you're looking for. One thing you should be aware of is that IDs and classes must start with a letter. We won't have to access those numbers in the script anyway. $(document).ready(function() {

[jQuery] Re: Newbie question about Radio Buttons

2008-02-12 Thread PKJ
Hi everyone, I found one way to do this, and it is only a few lines. This is my first use of JQuery so can anyone comment on whether there is a better way? script type=text/javascript $(document).ready(function() { $(input:radio).click(function() { thisClass =

[jQuery] Re: newbie question - why does this code not work?

2007-12-29 Thread cFreed
On 29 déc, 18:27, X490812 [EMAIL PROTECTED] wrote: ... parent.document.getElementById(buttonsForm:filterByActor).style.display=none //jQuery(#buttonsForm:filterByActor, parent.document).css({display:none}); }); //--/b The issue is that the jquery script that is commented out does not

[jQuery] Re: newbie question

2007-12-06 Thread Karl Swedberg
To get this to chain with the .click() method, you need to wrap it in $() so it looks like: $(this) Better still, don't bother with the .each(). $([EMAIL PROTECTED]'button'].button1).click(function(){MyFunc(this);}); --Karl _ Karl Swedberg www.englishrules.com

[jQuery] Re: Newbie question regarding requesting confirmation when a link is selected.

2007-12-02 Thread Wizzud
$('a.taskDelete').click(function(){ return confirm('Please confirm deletion...'); }); On Dec 2, 4:41 am, lattedaddy [EMAIL PROTECTED] wrote: Hi- I'm pretty new to both JS and JQuery. Thanks for the help in advance. I have a link in my code as follows (it talks to an app to do a

[jQuery] Re: Newbie Question: Callback for Load Only Works the First Time Load is Called?

2007-10-30 Thread Wizzud
Try... $(#HelpInfo).load(http://localhost:/index.php/your_plan/ ShowHelpInfo, {contents: htmlStr}, function(){ ScrollToDiv(HelpInfo); } ); }); On Oct 30, 7:53 pm, Vik_R [EMAIL PROTECTED] wrote: I've got some code that uses load to add some help info to a page when the user clicks on a

[jQuery] Re: Newbie Question: Callback for Load Only Works the First Time Load is Called?

2007-10-30 Thread Vik_R
That worked. Thanks! -- View this message in context: http://www.nabble.com/Newbie-Question%3A-Callback-for-Load-Only-Works-the-First-Time-Load-is-Called--tf4720377s27240.html#a13501834 Sent from the jQuery General Discussion mailing list archive at Nabble.com.

[jQuery] Re: Newbie Question: Specifying the links that are in a particular Div?

2007-10-29 Thread Karl Swedberg
Hi there, a couple of things. First, you can create your selectors the same way you do with css rules (but you can actually use all the selectors from css 1-3 with jQuery). So, inside the $(), just put in #menu a. Then, when you're dealing with links, you'll need to stop the default

[jQuery] Re: Newbie Question: Specifying the links that are in a particular Div?

2007-10-29 Thread Josh Nathanson
I think you want $(#menu a).click(function() { etc. }); -- Josh - Original Message - From: Vik_R [EMAIL PROTECTED] To: jquery-en@googlegroups.com Sent: Monday, October 29, 2007 12:04 PM Subject: [jQuery] Newbie Question: Specifying the links that are in a particular Div? I'd

[jQuery] Re: Newbie Question: Specifying the links that are in a particular Div?

2007-10-29 Thread Vik_R
Thanks very much, guys! -- View this message in context: http://www.nabble.com/Newbie-Question%3A-Specifying-the-links-that-are-in-a-particular-Div--tf4713851s27240.html#a13480579 Sent from the jQuery General Discussion mailing list archive at Nabble.com.

[jQuery] Re: Newbie question on hide objects

2007-10-26 Thread Adrian Lynch
How about creating the form once and moving it to where ever it's needed. This assumes you can only have one form displayed at a time. Failing that. Make one form and clone it each time it's needed. Adrian On Oct 25, 9:15 pm, Merlin [EMAIL PROTECTED] wrote: Hello everybody, I am trying to

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-24 Thread hobbit
by the keyboard. Why? Brook -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: September 20, 2007 1:21 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: NEWBIE QUESTION: Catch

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Brook Davies
I've tried this, but it does not catch change events trigged by the keyboard. Why? Brook -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: September 20, 2007 1:21 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: NEWBIE

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Richard D. Worth
Subject: [jQuery] Re: NEWBIE QUESTION: Catch Select event I believe you'd want the change handler. $(select).change(function() { //do some stuff here... )}; -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hobbit Sent: Thursday, September

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit
. Why? Brook -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: September 20, 2007 1:21 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: NEWBIE QUESTION: Catch Select event I believe you'd want the change

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Richard D. Worth
Matthews Sent: September 20, 2007 1:21 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: NEWBIE QUESTION: Catch Select event I believe you'd want the change handler. $(select).change(function() { //do some stuff here... )}; -Original Message- From: jquery

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit
: [jQuery] Re: NEWBIE QUESTION: Catch Select event I believe you'd want the change handler. $(select).change(function() { //do some stuff here... )}; -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hobbit Sent

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit
This does not seem to work for me. Could it be the version of jquery we are using? We are using an older version, version 1.0.3. Do you know if this is supported in that version? I tried replacing the // do some stuff here line with simply alert(hello!);, but this alert is not executed

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Richard D. Worth
On 9/21/07, hobbit [EMAIL PROTECTED] wrote: This does not seem to work for me. Could it be the version of jquery we are using? We are using an older version, version 1.0.3. Do you know if this is supported in that version? In my code I changed jquery-latest.js to jquery-1.0.3.js and it

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit
trigged by the keyboard. Why? Brook -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Andy Matthews Sent: September 20, 2007 1:21 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: NEWBIE QUESTION: Catch

[jQuery] Re: Newbie Question: Workiing with form fields and jQuery / Select in Particular

2007-09-20 Thread Glen Lipka
$(#mySelect option) $(#mySelect option:selected) $(#mySelect option:selected).attr(id); $(#mySelect)[0] //the actual dom node. All untested, but should be ok. Firebug in Firefox has all kinds of neat tools for this. In the script tab, put a watch for $(#mySelect) and you can inspect the

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-20 Thread Andy Matthews
I believe you'd want the change handler. $(select).change(function() { //do some stuff here... )}; -Original Message- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of hobbit Sent: Thursday, September 20, 2007 1:22 PM To: jQuery (English) Subject: [jQuery]

[jQuery] Re: newbie question

2007-09-15 Thread Wizzud
Your php program simply 'echo's its data. That data can be HTML, XML, JSON, etc, but whatever it is the $.ajax call needs to be aware of the type of data expected to be returned (dataType), and it can then inspect the returned data in its success handler and, if necessary, act on it. Example

[jQuery] Re: newbie question

2007-09-15 Thread Wizzud
I really think you should read through the examples given under the ajax() documentation, and the tutorials available on Ajax (and possibly some of the others too) - look for Tutorials on the jQuery website Documentation page. The ajax() examples show you what needs to go in your calling

[jQuery] Re: newbie question

2007-09-15 Thread 胡争辉
if php's version great than 5.2.0, you may use json_encode function. 2007/9/15, Wizzud [EMAIL PROTECTED]: Example (very simple!): /* * AjaxHandler.php */ ?php $myName = $_SERVER['PHP_SELF']; echo div id='ajaxOne'Hello World, from $myName/div; ? -- http://www.goumin.com/ QQ: 443089607

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread John Resig
.html() only gets the innerHTML for the first matched element. What are you trying to do with the children? --John On 9/12/07, Brook Davies [EMAIL PROTECTED] wrote: Hello, I am trying to simply grab the children of a div. The markup is: div id=content div

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread Stephan Beal
On Sep 12, 9:20 pm, John Resig [EMAIL PROTECTED] wrote: .html() only gets the innerHTML for the first matched element. i think that's what the OP is saying: the element's HTML he's getting back is *not* that of the first child element: div id=content div

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread Richard D. Worth
On 9/12/07, Stephan Beal [EMAIL PROTECTED] wrote: On Sep 12, 9:20 pm, John Resig [EMAIL PROTECTED] wrote: .html() only gets the innerHTML for the first matched element. i think that's what the OP is saying: the element's HTML he's getting back is *not* that of the first child element:

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread Stephan Beal
On Sep 12, 10:52 pm, Richard D. Worth [EMAIL PROTECTED] wrote: as John pointed out, html() returns innerHTML, not outer, so div id=panelPreview... should only be expected if $('#content').html() were called. Doh, of course. /me smacks forehead.

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread Glen Lipka
I have been playing around with this. http://www.commadot.com/jquery/selectorChildren.php It's interesting to me how text and html act differently in terms of encoding and what actually shows up. It's also interesting to see how text nodes and a div are treated. I am confused. Why aren't the

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread John Resig
parent is to children as parents is to find(*) That's the rough equivalence in jQuery. --John On 9/12/07, Glen Lipka [EMAIL PROTECTED] wrote: I have been playing around with this. http://www.commadot.com/jquery/selectorChildren.php It's interesting to me how text and html act differently

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread Richard D. Worth
On 9/12/07, Glen Lipka [EMAIL PROTECTED] wrote: I am confused. Why aren't the grandchildren being included in the call for children()? Using $(#content *) gets all the grandkids. I thought parents() gets all the grandparents. Is children different? $(#content).children() is equivalent to

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread Glen Lipka
Shouldn't it be child() and children() if we have parent() and parents()? I feel like we are mangling plural/singular rules. Glen On 9/12/07, Richard D. Worth [EMAIL PROTECTED] wrote: On 9/12/07, Glen Lipka [EMAIL PROTECTED] wrote: I am confused. Why aren't the grandchildren being

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread Karl Swedberg
On Sep 12, 2007, at 5:50 PM, Glen Lipka wrote: Shouldn't it be child() and children() if we have parent() and parents()? I feel like we are mangling plural/singular rules. I don't think so. As Richard pointed out, you can have more than one direct child (one level down) but you can only

[jQuery] Re: NEWBIE Question: children() skips first element?

2007-09-12 Thread Brook Davies
:[EMAIL PROTECTED] On Behalf Of John Resig Sent: September 12, 2007 12:21 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: NEWBIE Question: children() skips first element? .html() only gets the innerHTML for the first matched element. What are you trying to do with the children? --John On 9/12

[jQuery] Re: Newbie Question: Javascript Never Gets Called?

2007-09-11 Thread Glen Lipka
Can you possibly post this online? Would make it easier to debug. Glen On 9/10/07, Vik [EMAIL PROTECTED] wrote: I'm a Javascript newbie, but I do have some Javascript working, and I have the jQuery demo working. Here's the code I have on one of my html pages to load javascript: -

[jQuery] Re: Newbie Question: Javascript Never Gets Called?

2007-09-11 Thread Flesler
I am not sure, but maybe you could try to make those urls relative, maybe that will do. let's say your page is located at 'http://localhost:/.html', then call the scripts like this: script src=js/jquery.js type=text/javascript/script script type=text/javascript

[jQuery] Re: Newbie question about click()

2007-06-15 Thread Matt Stith
I believe you can use $(p).toggle(slow); and it will achieve the result you are after, no need for 2 seperate functions. On 6/15/07, Giovanni Battista Lenoci [EMAIL PROTECTED] wrote: Hi, I'm a newbie in jquery please be patient :-) I'm playin with jquery mixing some tutorials. I'm trying to

[jQuery] Re: newbie question: keypress vs keydown

2007-06-08 Thread Richard D. Worth
On 6/8/07, kotouc [EMAIL PROTECTED] wrote: Hi, my problem is that this code returns: keydown keypress keydown keypress keydown keypress keydown keypress keyup jQuery 1.1.2 and FF1.5 Further running: $('textarea').keydown(function(e){console.log(e);}); When I press and hold the key down it

[jQuery] Re: newbie question: keypress vs keydown

2007-06-08 Thread kotouc
Thanks for help Richard What bugs me is that keydown should be fired once. I wonder if it works for you guys that way. I am using the flag. The flag will be assigned x times during the keydown, which works however... var SHIFTKEY_FLAG=false; $(document).keydown( function(e){ if(e.shiftKey){

[jQuery] Re: newbie question: keypress vs keydown

2007-05-22 Thread james_027
Thanks a lot especially to your second post. :) cheers james On May 22, 11:59 am, Richard Worth [EMAIL PROTECTED] wrote: On 5/21/07, Richard Worth [EMAIL PROTECTED] wrote: On 5/21/07, james_027 [EMAIL PROTECTED] wrote: Hi, Is there a difference between to two? Any guidelines on

[jQuery] Re: newbie question: keypress vs keydown

2007-05-21 Thread Richard Worth
On 5/21/07, james_027 [EMAIL PROTECTED] wrote: Hi, Is there a difference between to two? Any guidelines on which one to use on a certion situation? There are three javascript events that can fire when a key is pressed: keydown keyup keypress Here's a great reference for figuring out what

[jQuery] Re: newbie question: keypress vs keydown

2007-05-21 Thread Richard Worth
On 5/21/07, Richard Worth [EMAIL PROTECTED] wrote: On 5/21/07, james_027 [EMAIL PROTECTED] wrote: Hi, Is there a difference between to two? Any guidelines on which one to use on a certion situation? There are three javascript events that can fire when a key is pressed: keydown keyup

[jQuery] Re: newbie question: how to set location to a target in a way that is supported by i.e. and safari?

2007-05-03 Thread Klaus Hartl
[EMAIL PROTECTED] wrote: Hi can jquery help with the followng problem? If, in conventional javascript, I have a function goToAnchor(){ href.location=#blah } and call it by body onLoad=goToAnchor() then it works fine in i.e. and firefox but causes safari to endlessly load the page - see

  1   2   >