$(document).ready( function(){
$(document).on('click', 'a[data-iframe-menu-entry="data-iframe-menu-entry"]', function(event) {
alert('hola');
....
vs
$.ready(function() {
$(document).on('click', 'a[data-iframe-menu-entry="data-iframe-menu-entry"]', function(event) {
alert('hola');
....
$.ready()
is supposed to be an alias, but it does not work for me. What is wrong?
答案 0 :(得分:1)
正确的别名形式是:
$(function() {
// Your code
});