javascript - .join() function cant load and be defined in jQuery -
here url: http://itsun.ir/test/ first excuse bad english, want add drag , drop layout wordpress theme, seems good, when li element move other columns, javascript should make cookie , save new positions load in other time, doesn't work correctly, when open resources tab in inspect element in chrome browser , move , li sortable item column , in resources panel occurs error said : [uncaught typeerror : object # has no method 'join' ] , have updated jquery doesn't make correct, can me out writting in correct way ???
<script type="text/javascript"> $(document).ready(function(){ // items function getitems(id) { return $('#' + id + '-list').sortable('toarray').join(',');
uncaught typeerror: object # has no method 'join'
} // load items cookie function loaditemsfromcookie(name) { if ( $.cookie(name) != null ) { renderitems($.cookie(name),"wrapp"); } else { alert('cookie "' + name + '" not set'); } } // render items function renderitems(id, itemstr) { var list = $('#' + id + '-list'); var items = itemstr.split(',') ( var in items ) { html = '<li class="sortable-item'; if ( id == 'wrapp' ) { html += ' columns'; } html += '" id="' + items[i] + '"><div class="loader"></div></li>'; list.append(html); // load html file $('#' + items[i]).load('content/' + items[i] + '.html'); } } // load items cookie or defaults var defaults = []; defaults['splash'] = 'rightc,centerc,leftc'; var splashsource = ( $.cookie('splash-cookie') == null ) ? defaults['splash'] : $.cookie('splash-cookie'); renderitems('splash', splashsource); // splash (top) $('#wrapp .sortable-list').sortable({ forcehelpersize: true, forceplaceholdersize: true, handle: '.label', containment: '#wrapper', opacity: 0.8, placeholder: 'placeholder', connectwith: '#wrapper .sortable-list', update: function(){ $.cookie('splash-cookie', getitems('splash')); } }); }); </script>
Comments
Post a Comment