la maintenant ca marche mais tout mes css deviennent voireux ...
Une petite fatigue ?
Moi aussi ...
Je regarde ca demain ?
/// (function($) { $(document).ready(function(){ $('.t3-mainnav').affix({ offset: { top: 30 } }); }); }(jQuery));
<?php
// CUSTOM CSS
if(is_file(T3_TEMPLATE_PATH . '/css/custom.css')) {
$this->addStyleSheet(T3_TEMPLATE_URL.'/css/custom.css');
}
// ligne à rajouter
$this->addScript (T3_TEMPLATE_URL.'/js/monscript.js');
?>
/** *------------------------------------------------------------------------------ * @package T3 Framework for Joomla! *------------------------------------------------------------------------------ * @copyright Copyright (C) 2004-2013 JoomlArt.com. All Rights Reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @authors JoomlArt, JoomlaBamboo, (contribute to this project at github * & Google group to become co-author) * @Google group: https://groups.google.com/forum/#!forum/t3fw * @Link: http://t3-framework.org *------------------------------------------------------------------------------ */ !function($){ var isTouch = 'ontouchstart' in window && !(/hp-tablet/gi).test(navigator.appVersion); if(!isTouch){ $(document).ready(function($){ // detect animation duration var mm_duration = 0; $('.t3-megamenu').each (function(){ if ($(this).data('duration')) mm_duration = $(this).data('duration'); }); if (mm_duration) { var style = '.t3-megamenu.animate .mega > .mega-dropdown-menu, .t3-megamenu.animate.slide .mega > .mega-dropdown-menu > div {'; style += 'transition-duration: ' + mm_duration + 'ms;'; style += '-webkit-transition-duration: ' + mm_duration + 'ms;'; style += '-ms-transition-duration: ' + mm_duration + 'ms;'; style += '-o-transition-duration: ' + mm_duration + 'ms;'; style += '}'; $('<style type="text/css">'+style+'</style>').appendTo ('head'); } var mm_timeout = mm_duration ? 100 + mm_duration : 500; $('.nav > li, li.mega').hover(function(event) { var $this = $(this); if ($this.hasClass ('mega')) { // add class animate $this.addClass ('animating'); clearTimeout ($this.data('animatingTimeout')); $this.data('animatingTimeout', setTimeout(function(){$this.removeClass ('animating')}, mm_timeout)); clearTimeout ($this.data('hoverTimeout')); $this.data('hoverTimeout', setTimeout(function(){$this.addClass ('open')}, 100)); } else { clearTimeout ($this.data('hoverTimeout')); $this.data('hoverTimeout', setTimeout(function(){$this.addClass ('open')}, 100)); } }, function(event) { var $this = $(this); if ($this.hasClass ('mega')) { $this.addClass ('animating'); clearTimeout ($this.data('animatingTimeout')); $this.data('animatingTimeout', setTimeout(function(){$this.removeClass ('animating')}, mm_timeout)); clearTimeout ($this.data('hoverTimeout')); $this.data('hoverTimeout', setTimeout(function(){$this.removeClass ('open')}, 100)); } else { clearTimeout ($this.data('hoverTimeout')); $this.data('hoverTimeout', setTimeout(function(){$this.removeClass ('open')}, 100)); } }); }); } (function($) { $(document).ready(function(){ $('.t3-mainnav').affix({ offset: { top: 30 } }); }(jQuery);
/* fond header */ .background { background: url("../images/banniere.jpg") repeat-x; margin-top: -36px; } .t3-header { padding-bottom: 0px !important; padding-top: 0px !important; } /* clean menu */ .t3-mainnav { background-color: transparent !important; background-image: none !important; background-repeat: repeat-x; border-bottom: 0px solid #CCCCCC !important; border-top: 0px solid #E6E6E6 !important; } .t3-mainnav .navbar .nav > li > a { border-right: 0px solid #D9D9D9 !important; border-top: 0 none; padding: 10px 20px; text-shadow: none; } .affix{top:0px; background: purple} .affix-top{top:10px; background: green} /* logo */ .logo-image a { background-repeat: no-repeat; height: 200px !important; width: 651px !important; } .head-search { float: right; margin-top: 80px !important; }
///
(function($) {
$(document).ready(function(){
$('.t3-mainnav').affix({
offset: {
top: 30
}
});
});
}(jQuery));
<div data-offset-top="0" data-spy="affix"> <div class="nav-collapse collapse<?php echo $this->getParam('navigation_collapse_showsub', 1) ? ' always-show' : '' ?>"> <?php if ($this->getParam('navigation_type') == 'megamenu') : ?> <?php $this->megamenu($this->getParam('mm_type', 'mainmenu')) ?> <?php else : ?> <jdoc:include type="modules" name="<?php $this->_p('mainnav') ?>" style="raw" /> <?php endif ?> </div> </div> </div>
Laisser un commentaire: