Widget:LoadRemoteContent: Difference between revisions

From Rangjung Yeshe Wiki - Dharma Dictionary
Jump to navigation Jump to search
((by SublimeText.Mediawiker))
No edit summary
Line 1: Line 1:
<div id="<!--{$id}-->">
<div id="<!--{$id}-->"></div>
<script
<script
   src="https://code.jquery.com/jquery-3.6.0.slim.min.js"
   src="https://code.jquery.com/jquery-3.6.0.slim.min.js"
Line 5: Line 5:
   crossorigin="anonymous"></script>
   crossorigin="anonymous"></script>
<script type="text/javascript" crossorigin="anonymous">
<script type="text/javascript" crossorigin="anonymous">
 
$(document).ready(function () {
function load(url, element){
$("#<!--{$id}-->").load("<!--{$src}--> #<!--{$hash}-->");
 
});
    req = new XMLHttpRequest();
    req.open("GET", url, false);
    req.send(null);
   
    element.innerHTML = req.responseText;
   
}
 
load("<!--{$src}-->", document.getElementById("<!--{$hash}-->"));
 
</script>
</script>
</div>

Revision as of 16:19, 17 May 2021

<script

 src="https://code.jquery.com/jquery-3.6.0.slim.min.js"
 integrity="sha256-u7e5khyithlIdTpu22PHhENmPcRdFiHRjhAuHcs05RI="
 crossorigin="anonymous"></script>

<script type="text/javascript" crossorigin="anonymous"> $(document).ready(function () { $("#").load(" #"); }); </script>