Reputation: 460
i'm working with drupal and the current version of jQuery for drupal is the 1.4, but in the current HTML the developer used the ON(). function, how can i adapt this for 1.4?
$('body').on('click.button.data-api', '[data-toggle^=button]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')
Upvotes: 1
Views: 200
Reputation: 29559
Have you checked into the .bind('click')
event?
$('#foo').bind('click', function() {
alert('User clicked on "foo."');
});
Upvotes: 1
Reputation: 3012
jQuery 1.3 used 'live', before being superseeded by on http://api.jquery.com/live/
Upvotes: 1