\n
\n
\n\n\n```","suggestedAnswer":[{"@type":"Answer","text":"The`` element is first notified of the click, then `Bold paragraph in a div
\n`, then `
`"},{"@type":"Answer","text":"The `
` element is first notified of the click, then `
`, then``"},{"@type":"Answer","text":"To know which element receives the event first, jQuery provides in the event parameter, the`target` and`currentTarget` properties."}],"acceptedAnswer":[{"@type":"Answer","text":"The`` element is first notified of the click, then `
`, then `
`"},{"@type":"Answer","text":"To know which element receives the event first, jQuery provides in the event parameter, the`target` and`currentTarget` properties."}]}}
Medium
Here is the following code. When clicked, which statements are true?
<script type="text/javascript"src="jquery.js"></script>
<div>
<p><b>Bold paragraph in a div</b></p>
</div>
<script type="text/javascript">
$('div').bind('click', function(event){
alert($(this).attr('nodeName'));
});
$('p').bind('click', function(event){
alert($(this).attr('nodeName'));
});
$('b').bind('click', function(event){
alert($(this).attr('nodeName'));
});
</script>
Author: InconnuStatus: PublishedQuestion passed 280 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
1
jQuery positioning: innerHeight and innerWidth include respectively the top and bottom padding, and the left and right padding of the considered element, while the outerHeight and outerWidth properties include the top and bottom margin respectively, and the left and right margin of the considered element.1
Implement a multi-selection behavior on a list of checkboxes in a form using jQuery.0
jQuery event handling methods: `trigger()`, `bind()`, `triggerHandler()`, `.on()`0
Select the first 5 elements in a list using jQuery1
We want to develop a jQuery plug-in or simply define our own methods or properties on the object by augmentation. Which of these statements are correct?0
Select an h1 element of class CSS blue having a div element in its parentage in jQuery1
Which of these different propositions are correct regarding AJAX processing in jQuery?