I'm trying to test JQuery in a Script Editor Web Part but it doesn't seem to be recognizing the JQuery. Any suggestions would be greatly appreciated.
Code:
<div id="testing-jq">Jquery Test - Fail!</div>
<script language="Javascript" type="text/javascript">
$(document).ready(function() {
$("#testing-jq").html("Jquery Test - Pass!");
});
</script>
Notes:
- JQuery.js file is linked to the MasterPage
- JQuery works if I embed it on the page template or use JS Link to a .js file
- Normal Javascript seems to work
- This is a Publishing Site
- MDS (Minimal Download Strategy) is turned off for the site.
- When I use Inspect Element on the page the SEWP is rendering the code on the page.
scripttag with jQuery reference after the code above? Also, could some other script use thewindow.$variable - have you tried withwindow.jQuery?