{"id":595,"date":"2015-04-21T07:07:00","date_gmt":"2015-04-21T13:07:00","guid":{"rendered":"http:\/\/www.idubbs.com\/blog\/?p=595"},"modified":"2015-04-21T07:07:00","modified_gmt":"2015-04-21T13:07:00","slug":"using-jquery-for-csr","status":"publish","type":"post","link":"https:\/\/www.idubbs.com\/blog\/2015\/using-jquery-for-csr\/","title":{"rendered":"Using jQuery for CSR"},"content":{"rendered":"<p>There are a few useful CSR utility solutions that require jQuery to be available to the CSR script. If you are an IW \/ Power User you don\u2019t necessarily need to know how to use jQuery explicitly, but there are some easy templates that only work by using it. <\/p>\n<p>If jQuery isn\u2019t already enabled for your site, you need to add the jQuery file and a link to it on the page you\u2019re using it on. <\/p>\n<ol>\n<li>Download the latest version of the file from <a href=\"https:\/\/jquery.com\/download\/\" target=\"_blank\">HERE<\/a>. Get the \u2018\u2026compressed, production\u2026\u2019 version. <\/li>\n<li>Copy the file to your Scripts library (just to be consistent with where your other CSR files are). <\/li>\n<li>On the page you are using jQuery dependent CSR, add a Script Editor web part. <\/li>\n<li>In the Editor web part, add the following line \u2013 or similar based on where your file is located. This worked for me by having the file in my Scripts library: <br \/>&lt;script language=&#8221;javascript&#8221; type=&#8221;text\/javascript&#8221; src=&#8221;..\/Scripts\/jquery-2.1.3.min.js&#8221;&gt;&lt;\/script&gt;\u201d<\/li>\n<\/ol>\n<p>Note: Take a peek at <a href=\"http:\/\/sympmarc.com\/2011\/05\/03\/adding-jquery-to-a-sharepoint-page-step-one-always\/\" target=\"_blank\">Marc\u2019s post<\/a> on jQuery to make sure your file is working properly. <\/p>\n<p>CSR that uses the jQuery library should now function properly. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are a few useful CSR utility solutions that require jQuery to be available to the CSR script. If you are an IW \/ Power User you don\u2019t necessarily need [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[10,11,13],"tags":[52,57,59],"class_list":["post-595","post","type-post","status-publish","format-standard","hentry","category-office365","category-sharepoint","category-sharepoint-2013","tag-csr","tag-jquery","tag-jslink"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgWQ1-9B","jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/comments?post=595"}],"version-history":[{"count":0,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/posts\/595\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/media?parent=595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/categories?post=595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.idubbs.com\/blog\/wp-json\/wp\/v2\/tags?post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}