My custom module:
appcodeZeromy_moduleviewfrontendwebjschangezipcode.js
define(('jquery'), function ($) {
'use strict';
$(document).ready(function()
{
$('#form').hide();
$("#changeButton").click(function() {
$("#form").toggle('slow');
});
$("#submit").click(function() {
var zipcode= $("#zipcode").val();
alert("Value: " + zipcode);
});
});
});
appcodeZeromy_moduleviewfrontendrequirejs-config.js
var config = {
map: {
'*': {
changezipcode: 'Zero_my_module/js/changezipcode',
},
}
};
Onclick event not triggered.