Is it possible to check if a certain class is present in an element and if yes, create a variable for my function?
<a href="#" id="clickMe"><span class="A open"></span>link</a>
For example if class open is present I will create a varialbe "close".
$(function ()
{
$('#clickMe').click(function ()
{
// if "open"
var myVar = 'close';
// else
var myVar = 'open';
});
});