Do you know why this method click doesn’t show alert? Because I’m not able to catch this event.
<!DOCTYPE html>
<html>
<head>
<script src="jquery.js"></script>
<script>
jQuery(function () {
jQuery(".jtable-command-button.jtable-edit-command-button").click(function () {
alert("asdas");
});
});
</script>
</head>
<body>
<h1>My First JavaScript</h1>
<p id="demo">This is a paragraph.</p>
<button class="jtable-command-button jtable-edit-command-button" title="Edytuj pozycję">
</body>
</html>
I give you for all of you points for help [closed] thanks
$function (probably from jQuery) without defining it (e.g. by loading jQuery)idselector but the element doesn’t have an id (it does have a class) (Note: after the first edit of the question, this is no longer the case)descendant combinatorand atype selector, but thetypeshould be aclassand the element you are targeting belongs to both classes. It doesn’t have an ancestor element which is a member of either of the classes. (Note: The HTML class attribute takes a space separated list of classes)A fixed version of the JS part would be: