LarsH
0
Q:

jquery on

$( "#target" ).click(function() {
  alert( "Handler for .click() called." );
});
23
$( "#dataTable tbody tr" ).on( "click", function() {
  console.log( $( this ).text() );
});
4
$('input').on('input propertychange', ()=>{});
1
// There are quite a few abstracted versions of the following
$('element').on('event', function() {
	// Do something
});

// Where 'event' is something such as 'click', 'hover' etc

// They are abstracted as seen below
$('element').click(function(){
	// Do something
});
$('element').hover(function(){
	// Do something
});

// etc...
6
$(document).on("click","#test-element",function() {});
1
$( "select" )
  .change(function () {
    var str = "";
    $( "select option:selected" ).each(function() {
      str += $( this ).text() + " ";
    });
    $( "div" ).text( str );
  })
3
$( "#target" ).click(function() {
  alert( "Handler for .click() called." );
});
-1
$(selector).on(event,childSelector,data,function,map)
0

New to Communities?

Join the community