javascript - This jQuery, Moment.js script won't display in SharePoint Online script editor web part, any ideas why? -
I have set up a script editor Web part in my SharePoint online account. The results show that when I am Page Edit , but not when Browsing page Here's the script I'm using: & lt; H3 & gt; You are married: & lt; Span id = "married" & gt; & Lt; / Span & gt; & Lt; / H3 & gt; & Lt; H3 & gt; Adam was born: & lt; Span id = "adamborn" & gt; & Lt; / Span & gt; & Lt; / H3 & gt; & Lt; Script src = "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" & gt; & Lt; / Script & gt; & Lt; Script src = "https://mysite.sharepoint.com/tech/Scripts/moment-with-langs.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; Function SetMoments () {Wedding = $ ('# Married'), Date = Moment ("1955-12-05", "YYYY-MM-DD"), Update = function () {married.html (date. FromNow ()); }; Updates(); Var adamBorn = $ ('# ...