Welcome aboard! We are happy you are here and wish you good net-raft!
<!DOCTYPE html>
<html lang="en">
<head>
<script src="https://code.jquery.com/jquery-2.1.3.min.js" type="text/javascript"></script>
</head>
<body>
<script>
$(document).ready(function () {
// append div
var text = $("<div class='new_div' style='cursor:pointer'>click here</div>");
$("body").append(text);
// make div clickable
$(document).on( "click", '.new_div', function() {
alert("clickable div");
});
});
</script>
</body>
</html>
The most helpful JQUERY solutions
plugin get client ip address using jqueryJQUERY Click to see more ... 10.5K 1.8K