I'm trying to use the below code to prefix all href's with 'cms/'... [code] $("#content_main a").attr('href', 'cms/' + $(this).attr('href')); [/code]
I end up with href's which look like this "cms/undefined". I guess I need to get $(this).attr('href') to return a string instead of a JQuery object? Many thanks, K.