I have a code snippet like this
$(document).ready(function() {
$('.hideMessage').on('click', function () {
$('.message').hide();
});
$('.message').on('hide', function() {
alert("hided");
});
(function ($) {
var el = $.fn['hide'];
$.fn['hide'] = function () {
this.trigger('hide');
return el.apply(this, arguments);
};
})(jQuery);
});
When i run this code on a simple html page; if hide event of '.message' element called, page show an alert message contains 'hided'. But it doesnt work on velocity template. 'hide' event doesnt be called.
Template renderer doesnt include '$' chars.
You'd have to change the $ with AJS.$().
All the javascript libraries are packages under AJS, AFAIK.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.