{"id":264,"date":"2010-10-19T15:32:31","date_gmt":"2010-10-19T15:32:31","guid":{"rendered":"https:\/\/www.taywa.ch\/blog\/?p=264"},"modified":"2010-10-19T15:39:01","modified_gmt":"2010-10-19T15:39:01","slug":"einfache-jquery-gallery-fuer-typo3","status":"publish","type":"post","link":"https:\/\/www.taywa.ch\/blog\/typo3\/einfache-jquery-gallery-fuer-typo3\/","title":{"rendered":"einfache jquery Gallery f\u00fcr typo3"},"content":{"rendered":"<p>Mit diesem einfachem jquery javascript code, erh\u00e4lt man eine Image-Gallery ohne eine zus\u00e4tzliche Extension in typo3.<\/p>\n<p>Einfach diesen Code im &lt;head&gt; des Template einf\u00fcgen. jQuery (&#8222;query-1.4.2.min.js&#8220;) muss im template Verzeichnis abgelegt sein. <\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;script src=&quot;jquery-1.4.2.min.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt;\r\n&lt;style type=&quot;text\/css&quot;&gt;\r\n   ul#gallery_nav { margin-bottom:5px; }\r\n   .csc-textpic-image, ul#gallery_nav li { cursor:pointer; }\r\n   ul#gallery_nav li { margin:0 1em 0.5em 0;float:left; }\r\n   ul#gallery_nav li.act { font-weight:bold; }\r\n   .csc-textpic-imagerow { display:none; }\r\n&lt;\/style&gt;\r\n&lt;script type=&quot;text\/javascript&quot;&gt;\r\nfunction add_click(index, Element) {\r\n    if (index &lt; 9) text_index = '0' + (index + 1);\r\n    else text_index = index + 1;\r\n    elem = $('&lt;li&gt;' + text_index + '&lt;\/li&gt;').click(function() { \r\n        $(&quot;.csc-textpic-imagerow&quot;).hide();\r\n        $('#gallery_nav li').removeClass('act');\r\n        $('#gallery_nav li').eq(index).addClass('act');\r\n        $(&quot;.csc-textpic-imagerow&quot;).eq(index).show();\r\n        $(&quot;.csc-textpic-imagerow&quot;).eq(index).click(function() {\r\n            max = $(&quot;#gallery_nav li&quot;).size();\r\n            if (index == max-1 ) jump = 0;\r\n            else jump = index+1;\r\n            $(&quot;#gallery_nav li&quot;).eq(jump).click();\r\n        });\r\n    });\r\n    elem.appendTo('#gallery_nav');\r\n}\r\n\r\n$(document).ready(function() {\r\n    $(&quot;.csc-textpic-imagerow&quot;).first().before('&lt;ul id=&quot;gallery_nav&quot;&gt;&lt;\/ul&gt;');\r\n    $('#gallery_nav li').first().addClass('act');\r\n    $(&quot;.csc-textpic-imagerow&quot;).each(add_click);\r\n    $(&quot;#gallery_nav li&quot;).first().click();\r\n});\r\n&lt;\/script&gt;\r\n<\/pre>\n<p>Sobald nun als Content Type &#8222;Images only&#8220; hinzugef\u00fcgt wird, werden die Bilder als klickbare Gallery angezeigt mit einem Zahlenindex. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Mit diesem einfachem jquery javascript code, erh\u00e4lt man eine Image-Gallery ohne eine zus\u00e4tzliche Extension in typo3. Einfach diesen Code im &lt;head&gt; des Template einf\u00fcgen. jQuery (&#8222;query-1.4.2.min.js&#8220;) muss im template Verzeichnis abgelegt sein. &lt;script src=&quot;jquery-1.4.2.min.js&quot; type=&quot;text\/javascript&quot;&gt;&lt;\/script&gt; &lt;style type=&quot;text\/css&quot;&gt; ul#gallery_nav { margin-bottom:5px; } .csc-textpic-image, ul#gallery_nav li { cursor:pointer; } ul#gallery_nav li { margin:0 1em 0.5em 0;float:left; }<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,3],"tags":[46,180],"class_list":["post-264","post","type-post","status-publish","format-standard","hentry","category-js","category-typo3","tag-jquery","tag-typo3"],"_links":{"self":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts\/264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/comments?post=264"}],"version-history":[{"count":28,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts\/264\/revisions"}],"predecessor-version":[{"id":292,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/posts\/264\/revisions\/292"}],"wp:attachment":[{"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/media?parent=264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/categories?post=264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.taywa.ch\/blog\/wp-json\/wp\/v2\/tags?post=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}