Vitalii Plodistov
Vitalii Plodistov

Reputation: 125

How to made unclickable area?

Could you help me plaese!

I had to use next jQuery functionality.

elem.parents('.CanvasRoot:first').unbind('click').click(function(){
...
}

<div class="CanvasRoot">
...
</div>

But now, I should add area inside the current div. And I don't need to that area called click js function.

<div class="CanvasRoot">
<table class="notForClick">
</table>
</div>

How can I prevent that area from clicking?

Thanks!

Upvotes: 0

Views: 699

Answers (2)

Royi Namir
Royi Namir

Reputation: 148744

$(".notForClick").click(function (e) {
   e.stopPropagation();
})

Upvotes: 4

Akhil Thayyil
Akhil Thayyil

Reputation: 9413

<div onClick="return false;">
Hi this is an unclickable area..
It will not respond to ur click's
</div>

<-- Using Jquery-->

<div id="unclick">
Hi unclickable...
</div>

$("#unclick").on('click',function(){return false;})

Upvotes: 1

Related Questions