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
//modal windows | |
$(".modal").on("click", function(e) { | |
//load modal mask | |
$("<div id='mask'></div>").appendTo("body"); | |
//remove existing modal window | |
$("#modal-window").remove(); | |
var content; |
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
// ----------------------------------------- | |
// Margin auto | |
// ------------------------------------------- | |
// example: @include margin-auto(); | |
@mixin margin-auto() { | |
margin-left:auto; |
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
// ----------------------------------------- | |
// Display inline block cross browser | |
// ------------------------------------------- | |
// example: @include inline-block(); | |
@mixin inline-block() { | |
display: -moz-inline-stack; |
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
// ----------------------------------------- | |
// Change placeholder text color | |
// ------------------------------------------- | |
// example: @include placeholder-color(#333); | |
@mixin placeholder-color($color){ | |
&.placeholder{ |
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 checkWindowSize() { | |
var windowWidth = $(window).width(); | |
var windowHeight = $(window).height(); | |
} | |
$(window).bind("resize", checkWindowSize); |
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
$("form").on("submit",function(event){ | |
event.preventDefault(); | |
$.ajax({ | |
type: "POST", | |
cache: false, | |
url: $(this).attr("action"), | |
data: $(this).serialize(), | |
success: function( data ) { | |
// put success action here | |
} |
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
// Create JSON object | |
echo json_encode( | |
array("title" => $title, | |
"description" => $description, | |
"keywords" => $keywords) | |
) |
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
*, | |
*:after, | |
*:before { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HTML5</title> | |
<meta name="description" content=""> | |
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen"> | |
</head> | |
<body> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script> |