Localizing methods for jQuery append prepend wrap parent

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>');
});