1
I Template di Joomla! 3 / Re:Protostar - pagina scorrevole su immagine di sfondo
« il: 17 Dic 2016, 23:25:18 »Codice: [Seleziona]
[quote author=ofranco link=topic=257134.msg1194201#msg1194201 date=1455135501]
Scarichi jquery backstretch e copi nella cartella: templates/protostar/js/jquery.backstretch.js.
Alla fine del codice .php:
{
$doc->addScript('templates/'.$this->template.'/js/jquery.backstretch.js');
}
?>
<!DOCTYPE html>
<html xmlns="[url]http://www.w3.org/1999/xhtml[/url]" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>">
<head>
Poi al tag body:
<body class="site <?php echo $option
. ' view-' . $view
. ($layout ? ' layout-' . $layout : ' no-layout')
. ($task ? ' task-' . $task : ' no-task')
. ($itemid ? ' itemid-' . $itemid : '')
. ($params->get('fluidContainer') ? ' fluid' : '');
echo ($this->direction == 'rtl' ? ' rtl' : '');
?>">
<?php
$doc->addScriptDeclaration('
(function($) {
$(document).ready(function() {
$.backstretch(["templates/protostar/images/tua_immagine.jpg"]);
});
})(jQuery);
');
?>
<!-- Body -->
<div class="body">
<div class="container<?php echo ($params->get('fluidContainer') ? '-fluid' : ''); ?>">
Ho inserito passo passo il codice, ma la pagina non scorre sull'immagine di fondo. Potrebbe non funzionare con Joomla! 3.6.4?
Ringrazio per l'aiuto.