$.position = 10; jQuery.moreFeedItems = function(position){ groupstring = ''; $(':checkbox[@name=groups]').each(function(){ if(this.checked){ groupstring += "&group[]=" + this.value; } }); $('#load-more').html(''); $.ajax({ url: '/', data: 'action=morefeeditems&position=' + position + groupstring, type: 'post', success: function(j){ $(j).hide().appendTo('ul.multiple-user-feeds').slideDown(); $(".flickr_link").colorbox(); $(".youtube_link").colorbox({ iframe:true, opacity:0.70, speed:500, width:800, height:600, href: function(){ return this.href.replace('watch?v=', 'v/'); } }); $.position += 10; $('#load-more').html('Meer...'); } }); }; $(document).ready(function(){ $('select[id=gemeentes]').change(function() { window.location = '/gemeentes/' + $(this).val(); }); $(".flickr_link").colorbox(); $(".youtube_link").colorbox({ iframe:true, opacity:0.70, speed:500, width:800, height:600, href: function(){ return this.href.replace('watch?v=', 'v/'); } }); $('#load-more').click(function(){ $.moreFeedItems($.position); }); $('#uitslag_gemeentes a').click(function(){ $.ajax({ url: 'http://gemeenteraad.pentapolitica.nl/uitslag/gemeente/' + (this).id, type: 'get', success: function(j){ $('#uitslag_gemeente').replaceWith('
'+j+'
'); } }); }); });