[jQuery] Re: XPATH question

2007-09-16 Thread Erik Beeson
If you're using jQuery 1.2, you need the XPath plugin, available here:
http://docs.jquery.com/Release:jQuery_1.2#XPath_Compatibility_Plugin

See here for more info:
http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality

--Erik


On 9/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 I went through John Resigs screencast on using jquery with firebug at

 http://jquery.com/blog/2007/01/26/introduction-to-firebug-and-jquery-screencast/

 I tried using xpath in the firebug console but get no results for a
 xpath that I get from firebug when inspecting a text element

 alert($(/html/body/div/div[2]/div[4]/div[4]/div/div/div[2]/div/
 p,document).text());

 also tried
 alert($(/html/body/div/div[2]/div[4]/div[4]/div/div/div[2]/div/
 p).text());

 Get a blank alert.

 Also tried adding it to the the html page to make sure it was not
 working from there.

 Whats wrong with the XPATH? I copied the xpath using firebugs Copy
 XPATH.
 Is this a known issue? Is there a workaround?
 Does anyone have a html page with working XPATH examples. I think this
 would really help newbies.
 Thanks
 -Milind




[jQuery] Re: XPATH question

2007-09-16 Thread Karl Swedberg
Even with the XPath plugin, you won't be able to use that selector.  
jQuery always only supported a subset of XPath, not the full spec.  
The div[2] part, for example, won't be recognized correctly by  
jQuery, in any version.



--Karl
_
Karl Swedberg
www.englishrules.com
www.learningjquery.com



On Sep 16, 2007, at 6:12 PM, Erik Beeson wrote:


If you're using jQuery 1.2, you need the XPath plugin, available here:
http://docs.jquery.com/Release:jQuery_1.2#XPath_Compatibility_Plugin

See here for more info:
http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality

--Erik


On 9/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

I went through John Resigs screencast on using jquery with firebug at
http://jquery.com/blog/2007/01/26/introduction-to-firebug-and- 
jquery-screencast/


I tried using xpath in the firebug console but get no results for a
xpath that I get from firebug when inspecting a text element

alert($(/html/body/div/div[2]/div[4]/div[4]/div/div/div[2]/div/
p,document).text());

also tried
alert($(/html/body/div/div[2]/div[4]/div[4]/div/div/div[2]/div/
p).text());

Get a blank alert.

Also tried adding it to the the html page to make sure it was not
working from there.

Whats wrong with the XPATH? I copied the xpath using firebugs Copy
XPATH.
Is this a known issue? Is there a workaround?
Does anyone have a html page with working XPATH examples. I think this
would really help newbies.
Thanks
-Milind






[jQuery] Re: XPATH question

2007-09-16 Thread Erik Beeson
Ah, right. I didn't look at it that closely. See here for more info on what
Karl is referring to:

http://docs.jquery.com/DOM/Traversing/Selectors#Supported_Predicates.2C_but_differently

--Erik


On 9/16/07, Karl Swedberg [EMAIL PROTECTED] wrote:

 Even with the XPath plugin, you won't be able to use that selector. jQuery
 always only supported a subset of XPath, not the full spec. The div[2]
 part, for example, won't be recognized correctly by jQuery, in any version.


 --Karl
 _
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com



 On Sep 16, 2007, at 6:12 PM, Erik Beeson wrote:

 If you're using jQuery 1.2, you need the XPath plugin, available here:
 http://docs.jquery.com/Release:jQuery_1.2#XPath_Compatibility_Plugin

 See here for more info:
 http://docs.jquery.com/Release:jQuery_1.2#Removed_Functionality

 --Erik


 On 9/16/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 
 
  I went through John Resigs screencast on using jquery with firebug at
  http://jquery.com/blog/2007/01/26/introduction-to-firebug-and-jquery-screencast/
 
 
  I tried using xpath in the firebug console but get no results for a
  xpath that I get from firebug when inspecting a text element
 
  alert($(/html/body/div/div[2]/div[4]/div[4]/div/div/div[2]/div/
  p,document).text());
 
  also tried
  alert($(/html/body/div/div[2]/div[4]/div[4]/div/div/div[2]/div/
  p).text());
 
  Get a blank alert.
 
  Also tried adding it to the the html page to make sure it was not
  working from there.
 
  Whats wrong with the XPATH? I copied the xpath using firebugs Copy
  XPATH.
  Is this a known issue? Is there a workaround?
  Does anyone have a html page with working XPATH examples. I think this
  would really help newbies.
  Thanks
  -Milind
 
 




[jQuery] Re: xpath question

2007-04-06 Thread Jörn Zaefferer


Blair Mitchelmore schrieb:


I heard John talking about adding in the /modules/module[1] syntax 
on the list a little while ago for jQuery 1.1.3 but that might have 
been pushed back to 1.2
Actually that is implemented in the latest revision. From what I 
understood, it isn't the same as :eq(n), its more like :nth-child(n).


--
Jörn Zaefferer

http://bassistance.de



[jQuery] Re: xpath question

2007-04-05 Thread Benjamin Sterling

Blair,
Thanks for the heads up, much appreciated.

--
Benjamin Sterling
http://www.KenzoMedia.com
http://www.KenzoHosting.com