> this is probably pretty simple but trying to find documentation on how
> to change the href value on an anchor tag.
>
> i've seen docs that let you filter an anchor tag based on class which
> is prob what i'll do but i need to change the url that it is pointing
> to href="some/pattern/here" to rewrite to ensure proper encoding (for
> spaces, etc.) and b/c i want to point it somewhere different.  this is
> prob not best approach overall but data is not easy to change for me
> so i want to change the url.
>
> I'll need to do same thing for  tags as well (point src to diff
> location).
>
> your help is appreciated.
>
> also looking for where documentation specifies what properties can be
> changed.


This is a job for "attr":

http://docs.jquery.com/Attributes

For example:
$('a').attr('href','http://malsup.com/jquery');
$('img').attr('src','myimage.jpg');

Reply via email to