Skip to main content

Infinite Ajax Scroll voor pagina's

More
10 years 2 months ago - 10 years 2 months ago #3095 by sandra
Ik heb mootools uit staan in mijn joomla installatie... :)

Met andere woorden , de website maakt geen gebruik van mootools...
Last edit: 10 years 2 months ago by sandra.

Please Log in to join the conversation.

More
10 years 2 months ago - 10 years 2 months ago #3096 by sandra
Ben deze topic tegengekomen:

stackoverflow.com/questions/11566862/inf...nator-when-were-done


optie:

finished: function() {
if (this.options.state.isDone) {
$('#load-more').remove();
}
},



optie:
loading: {
finishedMsg: "<div class='infinite-scroll-finished'>No more articles to load!</div>
<script type='text/javascript'> $('#infinity-start').hide(); </script>"
...
}


Ik ga het even proberen

Grt,

Sandra


================
Helaas, beide opties werken zover ik het heb getest niet...
Begint weer bij deal 1 (opnieuw)
Last edit: 10 years 2 months ago by sandra.

Please Log in to join the conversation.

More
10 years 2 months ago - 10 years 2 months ago #3097 by sandra
Mijn volledige template :

(Moet de table omzetten naar DIV's en stylesheet extern onderbrengen)


Code:
<?php // no direct acce defined('_JEXEC') or die('Restricted access'); echo '<div id="com_datafeeds">'; # # Copyright brambring.nl # https://www.affiliatefeeds.nl # joomla@brambring.nl ?> <div class="datafeeds_clear" > <table class="dagaanbiedingen" align="center;border-collapse: collapse;"><tbody> <?php $list_count=1; @$field1=$this->where['fields'][1]; @$field2=$this->where['fields'][2]; @$field3=$this->where['fields'][3]; $baselink=$this->where['baselink']; $where1=($this->where['level'] != 1); $where2=($this->where['level'] != 2); $where3=($this->where['level'] != 3); foreach ($this->dataitems as $item ) { $product_ref=$item['url']; $product_title=$item['title']; $product_price=$item['Prijs']; $product_image=$item['image']; $korting=number_format(($item['Select5']-$item['Prijs'])/($item['Select5']/100),0); @$s1=$item[$field1]; @$s2=$item[$field2]; @$s3=$item[$field3]; @$alt=df_alt($item['title']); $currency=$this->where['currency_sign']; print '<tr class="deal"> <td style="145px; vertical-align:top; margin:10px 0px; padding:10px; overflow:hidden;" align="left"><a class="dflink" style="color:#00B4E8;" href="'.$product_ref.'" onClick="javascript:urchinTracker('.$item['feed'].');" target="_blank" rel="nofollow"><img style="max-width:100px;max-height:100px;" src="https://m.mijndomeinnaam.nl/'.$item['feed_id'].'/'.$item['items_id'].'.jpg" alt="'.$alt.'"/></a></td>'; #titel# print '<td style="width:275px;height:auto; vertical-align:top; padding-top:4px;padding-left:20px; " align="left" > <a title="'.$alt.'" class="dflink" href="'.$product_ref.'" onClick="javascript:urchinTracker('.$item['feed'].');" style="font-size: 110%; font-weight: normal; text-transform: capitalize; color:#00B4E8; line-height:18px; text-align:left; margin-left:5px; padding-bottom:5%;" target="_blank" rel="nofollow">'.$item['title'].'</a> <br/><br/> '; #van voor prijs# if ($item['Select5'] > 0 ) { echo '<div class="normaleprijsopsomming"><ul style="list-style:square;"><li>Van: <font style=" text-decoration:line-through; font-weight:bold; color:#cc0000;"> '.$currency.' '.money_format('%!.2n', $item['Select5']).'</font> &nbsp;voor: <font style="font-weight:bold;font-size:120%; color:#000;"> '.$currency.' '.money_format('%!.2n', $product_price).' </font></li></ul></div>'; } else { print '<div class="normaleprijsopsomming"><ul style="list-style:square;"><li>Actieprijs: <font style="font-weight:bold; font-size:130%; color:#000;">'.$currency.' '.money_format('%!.2n', $product_price).' </font></li></ul></div> '; } #korting# if ($item['Select5'] > 0 ) { echo '<div class="normaleprijsopsomming"><ul style="list-style:square;"><li><font style="font-weight:bold; color:#000;"> '.$korting.'% korting </font></li></ul></div>'; } else { print ' '; } #aanbieder# if ($item['Select7'] > 0 ) { echo '<div class="aanbieder"><ul style="list-style:square;"><li><a class="dflink" style="color:#00B4E8;" target="_blank" href="'.$product_ref.'" onClick="javascript:urchinTracker('.$item['feed'].');" rel="nofollow">'.$item['Select7'].'</a></li></ul></div>'; } else { print '<div class="aanbieder"><ul style="list-style:square;"><li><a class="dflink" style="color:#00B4E8;" target="_blank" href="'.$product_ref.'" onClick="javascript:urchinTracker('.$item['feed'].');" rel="nofollow"> '.$item['feed'].'</a></li></ul></div>'; } #twitter# if ($item['Select5'] > 0 ) { echo '<div align="right" style="margin:2px;"><a href="https://twitter.com/home?status='.$item['title'].'. Van '.$item['Select5'].' Voor '.$product_price.', '.$korting.'procent korting op www.mijndomeinnaam.nl" title="Deel op Twitter" target="_blank"><img src="templates/mijndomeinnaam/images/Twitter-icon.png" alt="Deel mijndomeinnaam.nl op Twitter" width="30" height="30"></a></div>'; } else { print '<div align="right" style="margin:2px;"><a href="https://twitter.com/home?status='.$item['title'].'. Actieprijs van '.$product_price.' op www.mijndomeinnaam.nl" title="Deel op Twitter" target="_blank"><img src="templates/mijndomeinnaam/images/Twitter-icon.png" alt="Deel mijndomeinnaam.nl op Twitter" width="30" height="30"></a></div>'; } print '</tr><tr style="height:10px; border:0 none;"><td></td></tr>'; $list_count++; } print '</tbody></table></div></div>'; echo '<div class="pagination" id="datafeeds_bottom"></div>'; #REPLACED pagination code echo '</div>'; #ADDED $ajax=JRequest::getVar('ajax'); if ( ! $ajax ) { echo ' <script src="/templates/mijndomeinnaam-mobile-infinite/js/jquery.is4datafeeds.js"> </script> <script> (function($) { $(\'div#com_datafeeds\').infinitescroll({ navSelector:\'div.pagination\', itemSelector:\'.datafeeds_clear\', path: [window.location,\''.$this->where['aantal'].'\'], debug:true, }); })(jQuery); </script> '; }
Last edit: 10 years 2 months ago by sandra.

Please Log in to join the conversation.

More
10 years 1 month ago - 10 years 1 month ago #3111 by kevinp
@Sandra & @Bram

Ik heb ook de infinite scroll toegepast op mijn website.
Helaas krijg ik ook een loop erin...
Weet iemand wat het kan zijn?

Testpagina:
www.dagdealz.nl/mobile-infinite


De website maakt ook alleen gebruik van JQuery... Mootools ook geelimineerd :)
Last edit: 10 years 1 month ago by kevinp.

Please Log in to join the conversation.

More
10 years 1 month ago #3113 by redactie
De lus zit hem in de manier waarop de component omgaat met niet bestaande pagina's

Daarom is punt 4 nodig : affiliatefeeds.nl/datafeeds-configuratio...l-for-datafeeds.html

Please Log in to join the conversation.

Time to create page: 0.399 seconds