Código PHP:
<?php
$vn_scrollingColHeight = 600;
$vn_numItemsPerCol = 3;
?>
<h1><?php print _t("Favoritos ARCHIVO PRUEBA"); //MODIFICADO EN FavoritesController ?></h1>
<div class="textContent">
<?php
print $this->render('Favorites/favorites_intro_text_html.php');
?>
</div><!-- end textContent -->
<!-- end favoritesColumn -->
<div class="favoritesColumn2" id="recentlyAddedCol"> <!-- LLAMADA A CSS -->
<!-- <div class="favoritesColumn" id="recentlyAddedCol"> LLAMADA A CSS -->
<div class="title"><?php print _t("Recently Added"); ?></div>
<div class="bg2">
<div id="scrollRecentlyAdded">
<div id="scrollRecentlyAddedContainer">
<?php
$vn_recently_added_count = 0;
if(is_array($this->getVar("recently_added")) && sizeof($this->getVar("recently_added")) > 0){
foreach($this->getVar("recently_added") as $vn_object_id => $vs_thumb){
?>
<table cellpadding="0" cellspacing="0" style="float:left"><tr><td valign="middle" align="center"><?php print caNavLink($this->request, $vs_thumb, '', 'Detail', 'Object', 'Show', array('object_id' => $vn_object_id)); ?></td></tr></table>
<?php
$vn_recently_added_count++;
}
}
?>
</div><!-- end scrollRecentlyAddedContainer -->
</div><!-- end scrollRecentlyAdded -->
</div><!-- end bg -->
<a href="#" onclick="scrollRecentlyAddedItems(); return false;" class="more"><?php print _t("More"); ?> ></a>
</div><!-- end favoritesColumn -->
<script type="text/javascript">
var scrollRecentlyAddedItemsCurrentPos = 0;
function scrollRecentlyAddedItems() {
var t = parseInt(jQuery('#scrollRecentlyAddedContainer').css('top'));
if (!t) { t = 0; }
if ((scrollRecentlyAddedItemsCurrentPos + <?php print $vn_numItemsPerCol; ?>) >= <?php print $vn_recently_added_count; ?>) {
t = <?php print $vn_scrollingColHeight; ?>; scrollRecentlyAddedItemsCurrentPos = -<?php print $vn_numItemsPerCol; ?>;
}
jQuery('#scrollRecentlyAddedContainer').animate({'top': (t - <?php print $vn_scrollingColHeight; ?>) + 'px'}, {'queue':true, 'duration': 1000, 'complete': function() { jQuery('#scrollRecentlyAddedContainer').stop(true); scrollRecentlyAddedItemsCurrentPos += <?php print $vn_numItemsPerCol; ?>; }});
}
</script>
Espero pueda ayudarme y gracias por adelantado. Quisiera pasarles el codigo del jquery pero es muy largo y no me deja cargarlo. Espero puedan ayudarme. Igual puedo pasarle el archivo a quien se interese para que pueda ver el codigo.