{"id":4063263,"date":"2013-08-24T22:43:13","date_gmt":"2013-08-24T22:43:13","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/jqueryjs-generated-css-error\/"},"modified":"2016-08-21T04:16:01","modified_gmt":"2016-08-21T04:16:01","slug":"jqueryjs-generated-css-error","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/jqueryjs-generated-css-error\/","title":{"rendered":"JQuery\/JS generated CSS error"},"content":{"rendered":"<p>Hi,<\/p>\n<p>Just installed your plugin but a couple of images are appearing as broken.<\/p>\n<p>The code for the images use JS, JQuery and the CSS is created within the the js code as follows:<\/p>\n<pre><code>if(!has_filmstrip) {\n\t\t\t\t\/\/Add navigation buttons\n\t\t\t\t$(&#039;&lt;img \/&gt;&#039;).addClass(&#039;nav-next&#039;).attr(&#039;src&#039;,img_path+opts.nav_theme+&#039;\/next.png&#039;).appendTo(j_gallery).css({\n\t\t\t\t\t&#039;position&#039;:&#039;absolute&#039;,\n\t\t\t\t\t&#039;zIndex&#039;:&#039;1100&#039;,\n\t\t\t\t\t&#039;cursor&#039;:&#039;pointer&#039;,\n\t\t\t\t\t&#039;top&#039;:((opts.panel_height-22)\/2)+&#039;px&#039;,\n\t\t\t\t\t&#039;right&#039;:&#039;10px&#039;,\n\t\t\t\t\t&#039;display&#039;:&#039;none&#039;\n\t\t\t\t}).click(showNextItem);\n\t\t\t\t$(&#039;&lt;img \/&gt;&#039;).addClass(&#039;nav-prev&#039;).attr(&#039;src&#039;,img_path+opts.nav_theme+&#039;\/prev.png&#039;).appendTo(j_gallery).css({\n\t\t\t\t\t&#039;position&#039;:&#039;absolute&#039;,\n\t\t\t\t\t&#039;zIndex&#039;:&#039;1100&#039;,\n\t\t\t\t\t&#039;cursor&#039;:&#039;pointer&#039;,\n\t\t\t\t\t&#039;top&#039;:((opts.panel_height-22)\/2)+&#039;px&#039;,\n\t\t\t\t\t&#039;left&#039;:&#039;10px&#039;,\n\t\t\t\t\t&#039;display&#039;:&#039;none&#039;\n\t\t\t\t}).click(showPrevItem);\n\n\t\t\t\t$(&#039;&lt;img \/&gt;&#039;).addClass(&#039;nav-overlay&#039;).attr(&#039;src&#039;,img_path+opts.nav_theme+&#039;\/panel-nav-next.png&#039;).appendTo(j_gallery).css({\n\t\t\t\t\t&#039;position&#039;:&#039;absolute&#039;,\n\t\t\t\t\t&#039;zIndex&#039;:&#039;1099&#039;,\n\t\t\t\t\t&#039;top&#039;:((opts.panel_height-22)\/2)-10+&#039;px&#039;,\n\t\t\t\t\t&#039;right&#039;:&#039;0&#039;,\n\t\t\t\t\t&#039;display&#039;:&#039;none&#039;\n\t\t\t\t});\n\n\t\t\t\t$(&#039;&lt;img \/&gt;&#039;).addClass(&#039;nav-overlay&#039;).attr(&#039;src&#039;,img_path+opts.nav_theme+&#039;\/panel-nav-prev.png&#039;).appendTo(j_gallery).css({\n\t\t\t\t\t&#039;position&#039;:&#039;absolute&#039;,\n\t\t\t\t\t&#039;zIndex&#039;:&#039;1099&#039;,\n\t\t\t\t\t&#039;top&#039;:((opts.panel_height-22)\/2)-10+&#039;px&#039;,\n\t\t\t\t\t&#039;left&#039;:&#039;0&#039;,\n\t\t\t\t\t&#039;display&#039;:&#039;none&#039;\n\t\t\t\t});<\/code><\/pre>\n<p>The next.png and prev.png appear as broken images and when you inspect the element:<\/p>\n<pre><code>&lt;img class=&quot;nav-next&quot; src=&quot;undefinedlight\/next.png&quot; style=&quot;position: absolute; cursor: pointer; top: 344px; right: 58px;&quot;&gt;<\/code><\/pre>\n<p>and<\/p>\n<pre><code>&lt;img class=&quot;nav-prev&quot; src=&quot;undefinedlight\/prev.png&quot; style=&quot;position: absolute; cursor: pointer; top: 344px; left: 58px;&quot;&gt;<\/code><\/pre>\n<p>So the CSS is not being translated correctly by the plugin. <\/p>\n<p>When I de-activate the plugin I get the correct CSS for these images:<\/p>\n<pre><code>&lt;img class=&quot;nav-prev&quot; src=&quot;http:\/\/www.mysite.com\/wp-content\/themes\/hybrid-theme\/library\/js\/themes\/light\/prev.png&quot; style=&quot;position: absolute; cursor: pointer; top: 344px; left: 58px;&quot;&gt;<\/code><\/pre>\n<pre><code>&lt;img class=&quot;nav-next&quot; src=&quot;http:\/\/www.mysite.com\/wp-content\/themes\/hybrid-theme\/library\/js\/themes\/light\/next.png&quot; style=&quot;position: absolute; cursor: pointer; top: 344px; right: 58px;&quot;&gt;<\/code><\/pre>\n<p>Please can you provide a fix for this asap. Otherwise I cannot use your excellent plugin.<\/p>\n<p>Many Thanks<br \/>\nIndy<\/p>\n<p>https:\/\/wordpress.org\/plugins\/dependency-minification\/<\/p>\n","protected":false},"template":"","class_list":["post-4063263","topic","type-topic","status-closed","hentry","topic-tag-css","topic-tag-images","topic-tag-javascript"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4063263","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/4063263\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=4063263"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}