Changeset 70171 in spip-zone


Ignore:
Timestamp:
Feb 24, 2013, 10:05:06 PM (8 years ago)
Author:
kent1@…
Message:

Protéger le js at utiliser $(function(){ au lieu de jQuery(document).ready

Location:
_plugins_/mediaspip_player/trunk/modeles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/mediaspip_player/trunk/modeles/audio.html

    r69877 r70171  
    9999</div>
    100100<script type="text/javascript">
     101(function($) {
    101102        var ms_player_init_[(#GET{id_document_voir})] = function(){
    102103                if(jQuery('#audio_[(#GET{id_document_voir})]').parent('.media_wrapper').size() == 0){
     
    118119                }
    119120        }
    120         jQuery(document).ready(function(){
     121        $(function(){
    121122                ms_player_init_[(#GET{id_document_voir})]();
    122123                onAjaxLoad(function(){setTimeout(function(){ms_player_init_[(#GET{id_document_voir})]();},500)});
    123124        });
     125})(jQuery);
    124126</script>
    125127</BOUCLE_tous>
  • _plugins_/mediaspip_player/trunk/modeles/video.html

    r69877 r70171  
    139139</div>
    140140<script type="text/javascript">
     141(function($) {
    141142        var ms_player_init_[(#GET{id_document_voir})] = function(){
    142143                if($('#video_[(#GET{id_document_voir})]').parent('.media_wrapper').size() == 0){
     
    158159                }
    159160        }
    160         jQuery(document).ready(function(){
     161        $(function(){
    161162                ms_player_init_#GET{id_document_voir}();
    162163                onAjaxLoad(function(){setTimeout(function(){ms_player_init_#GET{id_document_voir}();},500)});
    163164        });
     165})(jQuery);
    164166</script>
    165167</BOUCLE_si_id>
Note: See TracChangeset for help on using the changeset viewer.