2
votes

So continuing my jQuery efforts using the Cycle plugin, i have a new error.

erros says Line 274 of my jquery-1.3.2.min.js file, which is this section here:

after: function() {
        return this.domManip(arguments, false, function(elem){
            this.parentNode.insertBefore( elem, this.nextSibling );
        });
    },

I am assuming that is caused by my cycle function used on the page:

<script type="text/javascript"> 
$(function() {
    $('.slideshow').after('<div id="mininav" class="mininav">').cycle({
        fx:     'fade',
        speed:  'fast',
        timeout: 5500,
    pause: 1,
        pager:  '#mininav',
        before: function() { if (window.console) console.log(this.src); }
    });


});
</script>

This script sits above the HTML:

<div class="tabContainer slideshow">


                <iw_iterate list="dcr.home.slideshow" var ='slideshow'>
                <![CDATA[


                <div class="tab current" style="background:#fff url({iw_value name='slideshow.image'/}) no-repeat top left;">
                    <div class="copy">
                    <h2>{iw_value name='slideshow.headline'/}</h2>
                    <p>{iw_value name='slideshow.text'/}</p>            
                    </div>
                </div>

                ]]></iw_iterate><![CDATA[


            </div><!--/tabContainer-->

I was able to utilze this script on another page, but i am wondering if it has to do with the dynamic iteration i use from my content management sytem, that creates the ".slideshow" divs based on how many entries i have in my visual editor...? BWAHHHH

2
The hell html is that? I've seen some weird html, but that takes the cake (no lies.) - Zirak

2 Answers

0
votes

Try closing the div tag which you are creating:

.after('<div id="mininav" class="mininav"/>')

or:

.after('<div id="mininav" class="mininav"></div>')
0
votes

EDIT:

Not sure what exactly your issue is, but here is a working jsFiddle demo.