jjzjj

javascript - 在 AJAX 加载后重新绑定(bind) jQuery 风格的 UI 界面的首选模式是什么?

这总能打动我。在网页上初始化所有可爱的UI元素后,我加载了一些内容(例如,进入模态或选项卡),新加载的内容没有初始化UI元素。例如:$('a.button').button();//jqueryuibuttonasanexample$('select').chosen();//chosenuiasanotherexample$('#content').load('/uri');//contentisnotstyled:(我目前的方法是创建一个需要绑定(bind)的元素注册表:varuiRegistry={registry:[],push:function(func){this.regi