Q:

How can I disable my javascript onclick button on another div?

How can I disable my javascript onclick button event on another div that is located inside a main div which contains my id. Here is the code:
 <div id="clickme">

 <div id="disabled_clickme">hello</div>

 </div>

 $('#clickme').click(function () {
 //SOME CODE
 }

How can I disable my clickme function?

A:

In JavaScript, the click event is triggered in the child nodes and then propagated to their parents. This is called event bubbling.
You can use the stopPropagation method in the event object from #disabled_clickme click to prevent it from reaching #clickme.
$('#disabled_clickme').click(function(e) {
    e.stopPropagation();
});

Live example: http://jsfiddle.net/PUTTQ/

