This file contains 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
/* --------------- reset.css --------------- */ | |
html, body, div, span, h1, h2, h3, h4, h5, h6, p, em, img, strong, sub, sup, b, u, i, dl, dt, dd, ol, ul, li, fieldset, form, label, table, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary, time, mark, audio, video { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
outline: 0; /* обнуляем отступы и убираем бордюры */ | |
vertical-align: baseline; /* приводим все к одной базовой линии */ | |
background: transparent; /* чтобы не проскакивали левые фоны, установленные по умолчанию */ | |
font-size: 100%; /* размер шрифта всем одинаковый */ | |
} |
This file contains 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 palindrome(str) { | |
// Step 1. Lowercase the string and use the RegExp to remove unwanted characters from it | |
var re = /[\W_]/g; // or var re = /[^A-Za-z0-9]/g; | |
var lowRegStr = str.toLowerCase().replace(re, ''); | |
// str.toLowerCase() = "A man, a plan, a canal. Panama".toLowerCase() = "a man, a plan, a canal. panama" | |
// str.replace(/[\W_]/g, '') = "a man, a plan, a canal. panama".replace(/[\W_]/g, '') = "amanaplanacanalpanama" | |
// var lowRegStr = "amanaplanacanalpanama"; | |
// Step 2. Use the same chaining methods with built-in functions from the previous article 'Three Ways to Reverse a String in JavaScript' |
This file contains 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
//Easy Form Validator | |
//Example: $("form").evalid("Error message"); | |
//Author URL: http://webdesign-master.ru | |
(function($) { | |
$.fn.evalid = function(req_text) { | |
$(this).find("input[type], textarea").each(function() { | |
$(this).after("<p class='form_error_message'>" + req_text + "").next().hide(); | |
}); |
This file contains 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
.loader { | |
background: none repeat scroll 0 0 #ffffff; | |
bottom: 0; | |
height: 100%; | |
left: 0; | |
position: fixed; | |
right: 0; | |
top: 0; | |
width: 100%; | |
z-index: 9999; |
This file contains 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
$(document).ready(function() { | |
function heigthDetect() { | |
$(".main_head").css("height", $(window).height()); | |
}; | |
heigthDetect(); | |
$(window).resize(function () { | |
heigthDetect(); | |
}); | |
This file contains 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 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
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen | |
and (min-width : 321px) { |
This file contains 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
/* | |
* запрещаем вводить цифры | |
* http://learn.javascript.ru/keyboard-events | |
*/ | |
// keydown event | |
e = (e) ? e : window.event; | |
var charCode = (e.which) ? e.which : e.keyCode; | |
// если от 0 до 9 |
This file contains 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 () { | |
jQuery('#top_menu li a').on('click', function(){ | |
var item = $(this).parent().attr('class'), | |
tar = $(this).attr('data'); | |
$("html, body").animate({ scrollTop: jQuery(tar).offset().top }, 1000); | |
}); | |
})() |
OlderNewer