If lu_ban_object.method
equals the string wrap
, and you’d like to use that string to call jQuery’s wrap()
method, you’d use bracket notation :
jQuery(function($) {
$('.advert')[lu_ban_object.method]('<div>Hello World</div>');
});
If lu_ban_object.method
equals the string wrap
, and you’d like to use that string to call jQuery’s wrap()
method, you’d use bracket notation :
jQuery(function($) {
$('.advert')[lu_ban_object.method]('<div>Hello World</div>');
});