script editor webpart
3 TopicsGetting the MArquee JQuery library to work
Hi I have a very simple javascript, Housed in @MikaelSvenson 's excellent script editor for the Modern UI. I am trying to get an announcement from the Announcements list to display on a modern UI Page from Right to Left across the page. Just like the old fashioned Marquee HTML element. But nothing is being displayed. CAn anyone see why ? <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/jquery.marquee/1.3.1/jquery.marquee.min.js"></script> <script type="text/javascript"> console.log("At start of REST Script"); $url = "https://<tenantname>.sharepoint.com"; $.ajax({ url: $url + "/_api/web/lists/getbytitle('Announcements')/items?select=*", method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function(data) { console.log("Success"); console.log(data.d.results); var $dataArray = data.d.results; for (var $i in $dataArray) { console.log(data.d.results[$i].Title); var $str = $dataArray[$i].Body0; var $gtindex = $str.indexOf(">"); $gtindex = $gtindex + 1; $str1 = $str.substring($gtindex); console.log($str.substring($gtindex)); var $ltindex = $str1.indexOf("<"); console.log($ltindex); console.log($gtindex); var $length = $ltindex -$gtindex; var $innertext = $str1.substring(0,$ltindex); console.log($innertext); var $bodyHtml = "<li>" +$innertext + "</li>"; $("marquee").append($bodyHtml); } }, error: function(data) { console.log("Failure"); alert(JSON.stringify(error)); } }); $("#marquee").marquee(); console.log("At End of Script"); </script> <ul id="marquee" class="marquee" /> Apologies for some of the code I have been debugging it. Thanks Nigel1.2KViews0likes1CommentNeed to Hide & Show field Sharepoint Form.
Hi SP Experts, I am very new to SharePoint, I have 1 requirement regarding the hide & Show field based on condition SharePoint Form. I tried to get the idea from the Internet and find so many solutions but when I am trying in SharePoint then I did not find the steps mentioned in the Threads. (Like - Adding Javascrit / WebPart) So I decided to raise my query here. My Issue - I have One Yes/No field if values is "Yes" then i need to display 2 field like i mentioned in the below screenshot. So Please suggest me the idea regarding my Issue. Internet Finding - https://www.enjoysharepoint.com/script-editor-web-part-sharepoint/ I can not see the "Insert" Tab in my Sharepoint. see the - below ScreenShot for2.9KViews0likes2Comments