{"id":45946,"date":"2022-10-28T22:07:40","date_gmt":"2022-10-28T22:07:40","guid":{"rendered":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/?p=45946"},"modified":"2022-10-28T22:08:29","modified_gmt":"2022-10-28T22:08:29","slug":"prevent-specific-javascript-jquery-script-to-run-in-oxygen","status":"publish","type":"post","link":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/prevent-specific-javascript-jquery-script-to-run-in-oxygen\/","title":{"rendered":"Prevent Specific Javascript\/jQuery script to run in Oxygen"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">jQuery(document).ready(function($) {\n\nif($('html').attr('ng-app') == 'CTFrontendBuilder') return;\n\n\/\/ YOUR CODE, which will work only in the public part of the site\n\n});<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note : The use-cases for this are below :<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Using Swiper Slider and want to edit all the slides in Oxygen and show slider view only on front-end.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Using Scripts that runs only on front-end or load after the page-load. In Oxygen builder they displays an error like &#8216;SCRIPTNAME&#8217; is not defined or is undefined.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. and much more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Note : The use-cases for this are below : 1. Using Swiper Slider and want to edit all the slides in Oxygen and show slider view only on front-end. 2. Using Scripts that runs only on front-end or load after the page-load. In Oxygen builder they displays an error like &#8216;SCRIPTNAME&#8217; is not defined or [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":46575,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Prevent Specific Javascript\/jQuery script to run in Oxygen - Code DPlugins","description":"Note : The use-cases for this are below : 1. Using Swiper Slider and want to edit all the slides in Oxygen and show slider view only on front-end. 2. Using Scri"},"_slim_seo_primary_term_category":0,"_slim_seo_primary_term_post_tag":0,"footnotes":""},"categories":[7],"tags":[10],"dpc_library":[],"class_list":["post-45946","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oxygen","tag-tips"],"_links":{"self":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/posts\/45946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/comments?post=45946"}],"version-history":[{"count":0,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/posts\/45946\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/media\/46575"}],"wp:attachment":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/media?parent=45946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/categories?post=45946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/tags?post=45946"},{"taxonomy":"dpc_library","embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/dpc_library?post=45946"}],"curies":[{"name":"wp","href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/api.w.org\/{rel}","templated":true}]}}