自定義jQuery插件方式實現(xiàn)強制對象重繪的方法

字號:


    這篇文章主要介紹了自定義jQuery插件方式實現(xiàn)強制對象重繪的方法,實例分析了jQuery插件及對象重繪的技巧,具有一定參考借鑒價值,需要的朋友可以參考下
    本文實例講述了自定義jQuery插件方式實現(xiàn)強制對象重繪的方法。分享給大家供大家參考。具體實現(xiàn)方法如下:
    jQuery.fn.redraw = function(){
    jQuery(this).each(function(){
    this.style.display='none';
    this.offsetHeight;
    // no need to store this anywhere, the reference is enough
    this.style.display='block';
    });
    };
    希望本文所述對大家的jQuery程序設(shè)計有所幫助。