Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1033614 // jsWaitForJQuery [dev.]

JavaX fragment (include)

1  
sS jsWaitForJQuery(S code) {
2  
  ret empty(code) ? ""
3  
    : [[
4  
    if (typeof $ !== undefined) document.addEventListener("DOMContentLoaded", function() { ]]
5  
      + code
6  
      + [[ });]];
7  
}

Author comment

Began life as a copy of #1033612

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033614
Snippet name: jsWaitForJQuery [dev.]
Eternal ID of this version: #1033614/1
Text MD5: 16ed029ac3a676433a16709a1280d255
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-11-16 00:59:50
Source code size: 193 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 146 / 180
Referenced in: [show references]