0

I'm having a strange problem with jQuery and SharePoint 2013.

I've created a page that contains a script editor webpart with some jQuery /JavaScript code.

When login with Windows user it is working fine.

But when I open Internet Explorer as different user it's not working.

Has anyone seen this before?

Edit:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script>$(document).ready(function() { 
alert("");
});</script>
3
  • 2
    could you please add your code, also maybe it's a permission issue? Commented Mar 29, 2017 at 13:56
  • I updated the answer , it's a simple code, any thoughts please?
    – Aashirya
    Commented Mar 29, 2017 at 14:32
  • If you are using publishing site incense, Please check it and Publish the page
    – Debugger
    Commented Mar 29, 2017 at 14:53

3 Answers 3

1

If you are using publishing site incense, Please check it and Publish the page

HOW TO SAVE AND PUBLISH Publishing is the ultimate form of making your completed work public. As soon as you publish, the world will see the changes you made to your page.

Step 1: Save

Once you have finished editing, click on "Save" to save your work and close editing mode. The page will remain checked out to you.

Note: You must complete the action of saving your work before publishing the page, or all of your changes may not be applied.

Save and Close enter image description here Step 2: Check In

Checking in a page after you have saved your work will allow others (who have access) to edit the page before the world sees it. For example, if Mike has just finished editing a page, he can now Check In the page so that his boss Mary can see and edit the page before deciding to publish it. Check In [![enter image description here][2]][2] Step 3: Publish

Once you have verified that you want the world to see your work, select “Publish."​ Leave a comment that describes what edits you made to the page (e.g. updated dates of deadlines, added new photo, etc.).

Publish ​ enter image description here

2

Try adding the type attribute to your script tags. I have run into issues when the type is not set.

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript">$(document).ready(function() { 
alert("");
});</script>
1

The type tag is the issue, it will solve the problem

<script type="text/javascript"> 

//code here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.