Re: [jQuery] Why does 'attr' work with 'divs' and not 'p's'?

2009-11-10 Thread D A
> jquery > var originalTitle=$("a.basic").attr("title"); >                        $("p.area1").text(originalTitle); > > html > This is where the original title should go > Your selector is looking for a paragraph with a class of 'area1'. However, there is no paragraph with that class in your mark

[jQuery] Why does 'attr' work with 'divs' and not 'p's'?

2009-11-10 Thread dorich
Using the following code jquery var originalTitle=$("a.basic").attr("title"); $("div.area1").text(originalTitle); html This is where the original title should go I get the expected title attribute written into the 'div'. However, if I swap the 'div' for a 'p' the resul