This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$text = strip_tags($curr->name); | |
if (!function_exists('truncate_words')) { | |
function truncate_words($text, $limit=30) { | |
$text=mb_substr($text,0,$limit); | |
/*если не пустая обрезаем до последнего пробела*/ | |
if(mb_substr($text,mb_strlen($text)-1,1) && mb_strlen($text)==$limit) { | |
$textret=mb_substr($text,0,mb_strlen($text)-mb_strlen(strrchr($text,' '))); | |
if(!empty($textret)) { | |
return $textret."..."; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Подключение файла JS | |
JHtml::script(JUri::base().'templates/'.$this->template.'/js/js.js', false); | |
$document = JFactory::getDocument(); | |
// Add Javascript | |
$document->addScriptDeclaration(' | |
window.event("domready", function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ======= Tabs Function ======= | |
(function($) { | |
$.fn.tabs = function() { | |
this.each(function() { | |
$(this).on('click', 'li:not(.active)', function() { | |
$(this) | |
.addClass('active').siblings().removeClass('active') | |
.closest('.tabs').find('.tab-block').removeClass('active').eq($(this).index()).addClass('active'); | |
return false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ============================= | |
Ajax Submit Form Plugin | |
Форма может скрываться на 4 секунды после отправки. Для этого оберните форму родительским блоком с классом - hide-form-success | |
=============================================================== */ | |
(function($) { | |
jQuery.fn.sendForm = function(options) { | |
options = $.extend({ | |
successTitle: "Ваше сообщение успешно отправлено!", | |
successText: "Мы свяжемся с Вами в самое ближайшее время" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ======= Tooltip ======= | |
(function($) { | |
$.fn.easyTooltip = function(options) { | |
// default configuration properties | |
var defaults = { | |
xOffset: 10, | |
yOffset: 25, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ======= Go Top ======= | |
(function($) { | |
jQuery.fn.scrollToTop = function() { | |
$(this).hide().removeAttr("href"); | |
if ($(window).scrollTop() != "0") { | |
$(this).fadeIn("slow") | |
} | |
var scrollDiv = $(this); | |
$(window).scroll(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ======= Popap Window Whit Magnific Popap ======= | |
$('.popup-window-link').magnificPopup({ | |
type: 'inline', | |
fixedContentPos: false, | |
fixedBgPos: true, | |
overflowY: 'auto', | |
closeBtnInside: true, | |
preloader: false, | |
midClick: true, |
OlderNewer