On every click i tried to check if the class exists, and if the class found then load the enscroll plugin.
but the problem is, after find the class st2-wr || st2, its again load the enscroll plugin with click event because the class exists,
i want only once the plugin load after finding the class.
$('.embtn').delegate(this, 'click', function(){
var $sec = $(this).closest('.sec'),
$parentSection = $sec.closest('.m_ms');
if($parentSection.hasClass('st2-wr') || $parentSection.hasClass('st2')){
$('.ms_box').enscroll({
showOnHover: true,
verticalTrackClass: 'track3',
verticalHandleClass: 'handle3'
});
}
});