Difference between revisions of "Template:Sidebar"

From Sinfronteras
Jump to: navigation, search
Line 690: Line 690:
 
             $('#totalItems, #enteredItems').keyup(function(){
 
             $('#totalItems, #enteredItems').keyup(function(){
 
                 checkUser()
 
                 checkUser()
                collapseSome()
 
 
                 removeCSS()
 
                 removeCSS()
  
                 // This function involved mw-collapsible, which has some problems when adding JS functionalities. So, to make sure
+
                 // This functions involved mw-collapsible, which has some problems when adding JS functionalities. So, to make sure
 
                 // this function do what it has to do, we have to ensure that it runs when the DOM is ready.
 
                 // this function do what it has to do, we have to ensure that it runs when the DOM is ready.
 
                 // Even inside «.ready()» is not working as expected (when we refresh the page, sometimes it works, sometimes it doesn't work).
 
                 // Even inside «.ready()» is not working as expected (when we refresh the page, sometimes it works, sometimes it doesn't work).
 
                 // So we needed to execute it after a delay:
 
                 // So we needed to execute it after a delay:
 
                 setTimeout( function() { resaltarSection() }, 1000 );  
 
                 setTimeout( function() { resaltarSection() }, 1000 );  
 +
                setTimeout( function() { collapseSome() },    1000 );
 
             });   
 
             });   
 
             checkUser()
 
             checkUser()
            collapseSome()
 
 
             removeCSS()
 
             removeCSS()
 
             setTimeout( function() { resaltarSection() }, 1000 );
 
             setTimeout( function() { resaltarSection() }, 1000 );
 +
            setTimeout( function() { collapseSome() },    1000 );
 
         });
 
         });
  
Line 716: Line 716:
 
     </script>
 
     </script>
 
}}
 
}}
 
<!-- {{#tag:html|
 
    <script>
 
 
        $(document).ready( function() {
 
            $('#totalItems, #enteredItems').keyup(function(){
 
                setTimeout( function() { resaltarSection() }, 1000 );
 
            }); 
 
            setTimeout( function() { resaltarSection() }, 1000 );
 
 
        });
 
 
    </script>
 
}} -->
 
  
  

Revision as of 23:07, 19 March 2021