Thanks Charlie! That did the trick :)

Charlie Tomlinson wrote:
> 
> 
> 
> 
> 
> 
> 
> removeAttr() will take the whole href property out of the tag 
> 
> <a href="something.php"> Test</a> will become <a>
> Test</a> 
> 
> if you want to keep href property you could overwrite the href values 
> 
> $('#add a').attr('href','#'); produces 
> 
> <a href="#"> Test</a> 
> 
> 
> 
> Sam Granger wrote:
> 
>   
>       $(function() {
>               $('#add a').removeAttr('href');
>       });
> 
> What's wrong with this code? I want to remove all href's from a tags
> onload
> of a document. Still a bit new to jQuery so sorry for this silly question!
> Just been trying to figure it out for ages. The links are in a div with id
> add.
> 
> Thanks for all the help!
> 
> Sam
>   
> 
> 
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/removeAttr%28%27href%27%29-on-document-load--tp23355653s27240p23358784.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to