码迷,mamicode.com
首页 > Web开发 > 详细

【EasyUI】使用Jquery.load动态加载时重新渲染

时间:2017-07-30 13:48:12      阅读:278      评论:0      收藏:0      [点我收藏+]

标签:成功   扩展   动态   jquery   this   extend   扩展方法   str   load   

EasyUI重新渲染:

$.parser.parse(‘#app‘); // 重新渲染 #app 下的元素

添加个扩展方法(方便使用):

1 $.fn.extend({
2      Load:function (url,fun) {
3          var $this = this;
4          $(this).load(url,function (resp,status,xhr) {
5              $.parser.parse($this);
6              fun(resp,status,xhr);
7          });
8      }
9 });

使用Load(扩展方法):

1 $("#app").Load("login.html",function () {
2         alert(‘加载成功!‘);
3 });

 

【EasyUI】使用Jquery.load动态加载时重新渲染

标签:成功   扩展   动态   jquery   this   extend   扩展方法   str   load   

原文地址:http://www.cnblogs.com/jiuxuan/p/7258690.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!