Monday, 2 September 2013

Javascript not updating text within a div

Javascript not updating text within a div

I must be daft, but the javascript is not changing the containing div text
as I would expect once the div is clicked:
favourite.onclick = function() {
loadXMLDoc('indexFavourite');
var linkclass = favourite.className;
if(linkclass == 'favouriteOption')
favourite.className = 'favouriteOptionActive',
favourite.className.update("New text");
else
favourite.className = 'favouriteOption';
}

No comments:

Post a Comment