I want to remove specific class ("help-text"). when user click on button specific class will be removed.
Here is my code
<div class="dropdown dropdown-lg">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
<img src="img/find-match.png"/>
<span class="help-text">Click Here</span>
</button>
</div>
<script>
jQuery(document).click(function (e) {
if (!jQuery(e.target).hasClass('dropdown-lg')) {
jQuery('.dropdown-lg').removeClass('help-text');
}
});
</script>
Kindly advice me any solution.