| 
				Плавающий блок, не работает часть кода в joomla 3
			 Добрый.Есть скрипт «прилипающего» блока, но часть кода, а именно: прекращение «прилипания» - не работает в Дж. 3
 
 <script type="text/javascript">
 (function( $ ){
 
 $.fn.containedStickyScroll = function( options ) {
 
 var defaults = {
 unstick : true,
 easing: 'linear',
 duration: 500,
 queue: false,
 closeChar: 'x',
 closeTop: 15,
 closeRight: 25
 }
 
 var options = $.extend(defaults, options);
 var $getObject = $(this).selector;
 
 if(options.unstick == true){
 this.css('position','relative');
 this.append('<a class="scrollFixIt">' + options.closeChar + '</a>');
 jQuery($getObject + ' .scrollFixIt').css('position','absolute');
 jQuery($getObject + ' .scrollFixIt').css('top',options.closeTop + 'px');
 jQuery($getObject + ' .scrollFixIt').css('right',options.closeRight + 'px');
 jQuery($getObject + ' .scrollFixIt').css('cursor','pointer','font-size','2em');
 jQuery($getObject + ' .scrollFixIt').css('font-size','2em');
 jQuery($getObject + ' .scrollFixIt').click(function() {
 jQuery($getObject).animate({ top: "0px" },
 { queue: options.queue, easing: options.easing, duration: options.duration });
 jQuery(window).unbind();
 jQuery('.scrollFixIt').remove();
 });
 }
 jQuery(window).scroll(function() {
 var topPadding = 75;
 if(jQuery(window).scrollTop() > (jQuery($getObject).parent().offset().top) &&
 (jQuery($getObject).parent().height() + jQuery($getObject).parent().position().top - 30) > (jQuery(window).scrollTop() + jQuery($getObject).height())){
 jQuery($getObject).css({ top: (jQuery(window).scrollTop() - jQuery($getObject).parent().offset().top) + topPadding },
 { queue: options.queue, easing: options.easing, duration: options.duration });
 }
 else if(jQuery(window).scrollTop() < (jQuery($getObject).parent().offset().top)){
 jQuery($getObject).css({ top: "0px" },
 { queue: options.queue, easing: options.easing, duration: options.duration });
 }
 });
 
 };
 })( jQuery );
 </script>
 <script type="text/javascript">
 jQuery(document).ready(function(){
 jQuery('#fixed').containedStickyScroll();
 });
 </script>
 
 
 Не работает весь скрипт из-за этой части кода:
 
 &&
 (jQuery($getObject).parent().height() + jQuery($getObject).parent().position().top - 30) > (jQuery(window).scrollTop() + jQuery($getObject).height())
 
 Без этой части кода - работает, но нет прекращения «прилипания» при достижения «footer» - уходит за него ...
 
 Заранее спасибо за помощь.
 
			
			
	
			
			
			
			
			
				  |