[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 wrote: > Greg, Nathan, Thanks very much for your help! > > On 1 March 2010 14:58, Nathan Klatt wrote: > > > On M

[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 wrote: > Hello... > > I have an unordered list containing nested lists... > >

[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 PM

[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

[jQuery] Re: Newbie Question

2009-08-04 Thread Liam Potter
}); } Dave Maharaj :: WidePixels.com wrote: 3 Errors syntax error [Break on this error] });\n (line 167) syntax error [Break on this error] });\n (line 6) _ajaxInit is not defined [Break on this error] _ajaxInit();\n That's what I see now but still nothing good happ

[jQuery] Re: Newbie Question

2009-08-04 Thread Dave Maharaj :: WidePixels.com
-04-09 1:34 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Newbie Question Have you updated the original script to my one? function _ajaxInit() { $("a.group").fancybox( { 'overlayShow': true }); }); wind

[jQuery] Re: Newbie Question

2009-08-04 Thread Liam Potter
rors syntax error [Break on this error] });\n (line 167) syntax error [Break on this error] });\n (line 6) _ajaxInit is not defined [Break on this error] _ajaxInit();\n That's what I see now but still nothing good happening. dave -Original Message- From: Liam Potter [mailto:radioa

[jQuery] Re: Newbie Question

2009-08-04 Thread Dave Maharaj :: WidePixels.com
otter [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&#x

[jQuery] Re: Newbie Question

2009-08-04 Thread Liam Potter
7;, function(){ $('#loadHere').load(url, function(){ $('#loadHere').fadeIn('fast'); }); }); return false; }); Dave -Original Message- From: Liam Potter [mailto:radioactiv...@gmail.com] Sent: August-04-09 12:5

[jQuery] Re: Newbie Question

2009-08-04 Thread Dave Maharaj :: WidePixels.com
.@gmail.com] Sent: August-04-09 12:50 PM To: jquery-en@googlegroups.com Subject: [jQuery] Re: Newbie Question function _ajaxInit() { $("a.group").fancybox( { 'overlayShow': true }); }); window.onload = function () { $('.slide

[jQuery] Re: Newbie Question

2009-08-04 Thread Liam Potter
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]; var container = $('#sli

[jQuery] Re: newbie question.

2009-07-27 Thread RobG
On Jul 28, 5:53 am, James 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: http://www.jibbering.com/faq/faq_notes/closures.

[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" wrote: > That's a great explanation, James. I hope you won'

[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 pol

[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-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 us

[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 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 correct? > > > > On Jul 1

[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 pl

[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, raisputin wrote: > > Hello, > > I have just discovered jQuery and it looks cool. I used the jQuery UI > builder at ui.jquery.com to build the UI and it looks a

[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 wrote: > Hello. > > I am trying to do something like this > $(el

[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 wrote: > http://docs.jquery.com/Selectors > > look at the last item in "Basics" , "Selector1,Selector2" and click on > it to

[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 A

[jQuery] Re: Newbie question on selectors

2009-06-03 Thread Karl Swedberg
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 with class that begins with '

[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" wrote: > I have a page with 6 links that each have a unique class ; > edit_profile > edit_preferences > edit_journal

[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 not

[jQuery] Re: Newbie question on selectors

2009-06-03 Thread James
ls.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

[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:

[jQuery] Re: Newbie question on selectors

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

[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 hav

[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-25 Thread kiusau
On May 25, 3:44 am, Jason Persampieri 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 originator's ques

[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 wrote: > I hate to say this but i'm using IE6 for compatibility testing because > that (like it or not) is still our organisation's stan

[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 wrote: > re: this vs $(this) - > this = DOMNode > $(this) = [DOMNode] (ie, an array containing the single element

[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 bui

[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
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 node. Hence, to get the jQuery object for that node, use $(this) (note the lack of quote

[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(); }); Show/hide info some When I click #show_hide_info, this doesn't move me to my anchor. So what I am doin

[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 wrote: > Hello! > > I think very simple question, but I am very new to jquery... > For example, I have the next code: > >         $('#info').hide(); >         $('a#show_hi

[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(''+ thisName +"'s additional Info" ); }); }); With your approach of $('.nam

[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 K

[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 Jonathan
have to write out jQuery.noConflict() or > > $.noConflict(), right? > > > Rick > > > -Original Message- > > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > > > Behalf Of Jonathan > > Sent: Tuesday, Apr

[jQuery] Re: newbie question

2009-04-07 Thread Jonathan
t; > 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() removes the $ alias so other frameworks don't > throw a fit. > > $bfa = jQu

[jQuery] Re: newbie question

2009-04-07 Thread Rick Faircloth
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() removes the $ alias so other frameworks don't throw a fit. $bfa = jQuery.noConflict() simply assig

[jQuery] Re: newbie question

2009-04-07 Thread Jonathan
x27;t have > to do so much typing.   $bfa or jq is just quicker.  It's just a convenience > thing...perhaps someone else has more to offer in terms of explanation. > > hth, > > Rick > > -Original Message- > From: jquery-en@googlegroups.com [mailto:jquery...@goog

[jQuery] Re: newbie question

2009-04-07 Thread Rick Faircloth
-- 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 Hi, Rick. Here's a quote to my hosting news group that 'splains' what has happened since yesterday. Maybe y

[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 It turns out that what I downloaded from jQuery ended up with a bunch of line feeds in it...my bad I'm sure. I en

[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? If you do, then also post your jQuery code and your HTML so it's easier to see where the problem may be in y

[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 wrote: > $(".clickme").attr("id"); > > On 24 Mrz., 14:03, Jesse wrote: > > > Hello, > > > I am not good at js. I want to get the id from "A" tag. > > E.g. link > > > I need the value "1234" from the code above, but dont know how to do > > it. >

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

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

[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: http://ui.jquery.com/d

[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. > >         $('

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

2008-10-15 Thread Mike Alsup
> 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 item. >                 Item = $('item',xml).get(i); >        

[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 i

[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

[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

[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 > excel

[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() { $('div.add_image_content').h

[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? $(document).ready(function() { $("input:radio").click(function() { thisClass = $(this).attr("class");

[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"}); > > }); > > //--> > > The issue is that the jquery script that is com

[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 www.lear

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

2007-12-03 Thread kiboro
Just a quick point. You shouldn't really have 'delete' as a hyperlink. Any actions which affect your database should be a POST from a form submission. The reason for this is simple. If your site is public and google or someone crawls your site it will hit all the delete hyperlinks (ignoring the j

[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 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: 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 cl

[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: 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 beh

[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: Sent: Monday, October 29, 2007 12:04 PM Subject: [jQuery] Newbie Question: Specifying the links that are in a particular Div? I'd like to attach an onc

[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

[jQuery] Re: Newbie question

2007-10-02 Thread Glen Lipka
Im not understanding. If you have that CSS, it's applied to the id="Explanation". What do you want to add? Glen On 10/2/07, Johny <[EMAIL PROTECTED]> wrote: > > > Hi, > I have style defined like this > > div#Explanation{position:absolute; top:720px; width:10px; right: > 0px;margin:40px 0 0 0;}

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-24 Thread hobbit
t; > On Sep 21, 10:01 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote: > > > > > The change event doesn't fire until the input is blurred (focus moves > > > > away > > > > > from the dropdown via tab-key or mouse click elsewhere). If you want

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit
If you want to > > > > handle the "changes" to the selected option while they're being changed, > > > try > > > > keydown, keyup, or keypress. > > > > > - Richard > > > > > On 9/21/07, Brook Davies <[EMAIL PROTECTED]&

[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 an

[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 w

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit
to the selected option while they're being changed, > > try > > > keydown, keyup, or keypress. > > > > - Richard > > > > On 9/21/07, Brook Davies <[EMAIL PROTECTED]> wrote: > > > > > I've tried this, but it does not catch change

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Richard D. Worth
> keydown, keyup, or keypress. > > > > - Richard > > > > On 9/21/07, Brook Davies <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > I've tried this, but it does not catch change events trigged by the > > >

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread hobbit
eing changed, try > keydown, keyup, or keypress. > > - Richard > > On 9/21/07, Brook Davies <[EMAIL PROTECTED]> wrote: > > > > > > > I've tried this, but it does not catch change events trigged by the > > keyboard. Why? > > > Brook >

[jQuery] Re: NEWBIE QUESTION: Catch Select event

2007-09-21 Thread Richard D. Worth
y 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... > )};

[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: N

[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] NEW

[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 t

[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 > */ > $myName = $_SERVER['PHP_SELF']; > echo "Hello World, from $myName"; > ?> > -- http://www.goumin.com/ QQ: 443089607 QQ mail: [EM

[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 program

[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 (ve

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

2007-09-12 Thread Brook Davies
so, I can have a testing area and I can simply include and edit the js files to tweak code as opposed to getting it from the database and upating the database each time. Brook -Original Message----- From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of John Resig Sent: Sep

[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 e

[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 be

[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 equ

[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 diffe

[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 gra

[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 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 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

[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: > > > > > >

[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: > > > >

[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: also, I don't know if that's how it is in your page, but don't leave whitespaces in the src. On 11 sep

[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 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 tryi

[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){ S

[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

  1   2   >