I have this variable and i want to add a class to it.
I tryed this method, but this defenetly is not working
var someVar = '<i class="firstClass"></i>';// Html Markup to be used later.
someVar.addClass('secondClass');
I need a different method to adding a new class to the html markup.
Thanks
You can only use addClass on a HTML element so you need to set your variable to be a DOM element (e.g.
$('<i>')):-