{"id":823,"date":"2022-08-30T15:07:46","date_gmt":"2022-08-30T15:07:46","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/09\/styleset-property-error-cannot-set-property-webkittransition-of-undefined-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:07:46","modified_gmt":"2022-08-30T15:07:46","slug":"styleset-property-error-cannot-set-property-webkittransition-of-undefined-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/styleset-property-error-cannot-set-property-webkittransition-of-undefined-collection-of-common-programming-errors\/","title":{"rendered":"StyleSet property ERROR: Cannot set property &#39;webkitTransition&#39; of undefined-Collection of common programming errors"},"content":{"rendered":"<p>I am attempting to use the style.setProperty to create a sliding effect in Javascript.<\/p>\n<p>Here is my code:<\/p>\n<pre><code>imageArray = [\n    '<img decoding=\"async\" src=\"assets\/bg1.jpg\" \/>',\n    '<img decoding=\"async\" src=\"assets\/bg2.jpg\" \/>',\n    '<img decoding=\"async\" src=\"assets\/bg3.jpg\" \/>',\n];\n\nvar slideWidth = 300;\nvar slideHeight = 420;\n\nvar currentTranslation = -slideWidth;\n\nfunction init() {\n    imageArray.style.webkitTransition = '-webkit-transform 1200ms';\n    getArray();\n}\n\nfunction getArray() {\n    for (var i = 0; i &lt; imageArray.length; i++) {\n    $('.inner-image').append(imageArray);\n    \/*not sure if this is relevant  \n    imageArray.src = ary[i].media.m;*\/\n    }\n}\n<\/code><\/pre>\n<p>I&#8217;m new to programming so please forgive syntax errors or inconsistencies in logic. Thanks for your help.<\/p>\n<p id=\"rop\"><small>Originally posted 2013-11-09 22:47:40. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I am attempting to use the style.setProperty to create a sliding effect in Javascript. Here is my code: imageArray = [ &#8221;, &#8221;, &#8221;, ]; var slideWidth = 300; var slideHeight = 420; var currentTranslation = -slideWidth; function init() { imageArray.style.webkitTransition = &#8216;-webkit-transform 1200ms&#8217;; getArray(); } function getArray() { for (var i = 0; i [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-823","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/823","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=823"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/823\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=823"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=823"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=823"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}