aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes child node issue Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "child node issue" Watch "child node issue" New topic
Author

child node issue

Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88
Hi

I have an anchor tag inside a div . im using



its doesnt work

Help me out guys
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15362
    
    6
$('div#contactEmail > a')[0] returns a DOM HTML Object and NOT a jQuery Object. attr() does not exist on a DOM node.

One option is to change your selector to use :eq(0) or you can do



Eric
Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88
thanks for the reply eric

i get totally confused about this DOM and jquery . when would i get which object , thatz the question i always ponder upon
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56549
    
  14

It's simple: if you want to use DOM methods, get the DOM element. If you want to use jQuery methods, don't.

Stop and think about what the expressions that you are using mean -- don't just parrot syntax.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56549
    
  14

Naveen puttu wrote:thatz the question i always ponder upon

Please UseRealWords when posting to the fotums.
Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88
Sorry bear
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: child node issue
 
Similar Threads
Uneven spaces between tables
100% height does not work
Page Break problem in Mozilla
how to get HTML div id name from RootPanel
Spring MVC Request Mapping