I have a div with two class.
<div class="one two"></div>
I need to get first of them without .split() callback.
$(this).parent('div[class]').attr('class').split(' ')[0]
Any idea?
Thanks in advance.
UPD: Why I need this? ) Because then I use split(), code inspector in Chrome said exactly :
Uncaught TypeError: Cannot call method 'split' of undefined
аnd some function not work properly.