$(document).ready(function() {
$('a#fav').bind('click', function() {
addFav(<?php echo $showUP["uID"]; ?>);
});
});
I need to modify this so if the a#fav has class=”active” then it should do
removeFav(<?php echo $showUP["uID"]; ?>);
instead
How can i do this?
You want to use the
hasClassfunctionEDIT: And just for fun, another way to write it in a more condensed format