Published
- 1 min read
jquery if element is clicked
The solution for this is noted below
jquery if element is clicked
Solution
$('#element').click(function () {
var $this = $(this)
if ($this.data('clicked')) {
func(some, other, parameters)
} else {
$this.data('clicked', true)
func(some, parameter)
}
})
Try other methods by searching on the site. That is if this doesn’t work