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
| function heightDetect() { | |
| $(".main_head").css("height", $(window).height()); | |
| }; | |
| heightDetect(); | |
| $(window).resize(function() { | |
| heightDetect(); | |
| }); | |
| //2 |
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
| //Animate CSS + WayPoints javaScript Plugin | |
| //Example: $(".element").animated("zoomInUp", "zoomOutDown"); | |
| (function($) { | |
| $.fn.animated = function(inEffect, outEffect) { | |
| $(this).css("opacity", "0").addClass("animated").waypoint(function(dir) { | |
| if (dir === "down") { | |
| $(this).removeClass(outEffect).addClass(inEffect).css("opacity", "1"); | |
| } else { | |
| $(this).removeClass(inEffect).addClass(outEffect).css("opacity", "1"); | |
| }; |
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 if ( have_posts() ) : query_posts('p=1'); | |
| while (have_posts()) : the_post(); ?> | |
| <?php the_title(); ?> | |
| <?php the_content(); ?> | |
| <?php the_post_thumbnail(array(100, 100)); ?> | |
| <? endwhile; endif; wp_reset_query(); ?> |
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
| if ($( document ).width() > 480) { | |
| $.getScript( "script.js"); | |
| } |
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
| 1) header и footer перемещаем в отдельные файлы header.php и footer.php | |
| на их местах в index.php вставляем команды: | |
| <?php get_header();?> // подключаем header | |
| <?php get_footer();?> // подкючаем footer | |
| 2) в header.php после всех стилей добавляем функцию <?php wp_head();?>. В footer.php после всех скриптов добавляем <?php wp_footer();?> | |
| ++++++++++++++++++++++++++++++++Подключение стилей+++++++++++++++++++++++++++++++++++++++ | |
| 3) ко всем локальным путям добавляем функцию по образцу: | |
| <link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/css/main.css"> | |
| <script src="<?php echo get_template_directory_uri();?>/js/main.js"></script> | |
| <img src="<?php echo get_template_directory_uri();?>/img/photo.jpg" alt="my-photo"> |
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
| $(function(){ | |
| var maxHeight = 0; | |
| $(".col-md-3").each(function() { | |
| if ( $(this).height() > maxHeight ) | |
| { | |
| maxHeight = $(this).height(); | |
| } | |
| }); | |
| $(".col-md-3").height(maxHeight); | |
| }); |
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
| Полезные ссылки: | |
| https://ilyaut.ru/ | |
| +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
| Авторизация в админке сайта MODX (если потеряли пароль админа) | |
| <?php | |
| define('MODX_API_MODE', true); | |
| require 'index.php'; | |
| $member = $modx->getObject('modUserGroupMember', array('user_group' => 1)); | |
| $user = $modx->getObject('modUser', $member->member); |
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
| if($(".checkbox1").is(":checked")) { | |
| $('.sub_btn').submit(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
| Мультиязычность MODX | |
| Обратить внимание на пути к скриптам и картинкам / слешь перед assets | |
| Если Русский главный | |
| Ключи Значения | |
| http_host exempl.com | |
| base_url / | |
| cultureKey ru | |
| site_start (id главной строници) |
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
| Поставьте дополнение Console и проверьте в принципе отправку почты, | |
| выполнив два отдельных кода: | |
| 1. Просто через функцию mail() print (int)mail('test@some.host', 'subject', 'message'); | |
| 2. Через MODX: print (int)$modx->user->sendEmail('message'); | |
| Желательно, чтобы оба варианта вернули 1. Просто есть подозрение, что ваш сервер просто не отправляет почту. | |
| Да еще модх не любит почту от mail.ru | |
| ============================================================= | |
| Закрытие модального окна после отправки AjaxForm |
OlderNewer