I am new to Javascript, I am using Backbone So I add a style like this(to a link when its clicked)
$(eventC.target.parentNode).css('border', '1px solid red');
I want the previous link to be cleared of the red border I added when I click on new link
I looked at link below jQuery - remove style added with .css() function
So in essence I want to do this:
$(OLDLINK).css('border', 'none');
$(NewLINK).css('border', '1px solid red');
with events I get from backbone
Is there a simple way to do this? or is this approach just wrong?