<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.7.js'></script>
<script type='text/javascript'>
$(function(){
function alertIt(id, descr) {
console.log(id + ' ' + descr);
}
$('button').click(function() {
var $this = $(this),
id = $this.data('myid'),
descr = $this.data('mydescr');
alertIt(id , descr );
});
});
</script>
</head>
<body>
<button data-myId="1001" data-myDescr="The thing we delete">Click me!</button>
</body>
</html>