Skip to content

Instantly share code, notes, and snippets.

/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {
.animated {
/*CSS transitions*/
-o-transition-property: none !important;
-moz-transition-property: none !important;
-ms-transition-property: none !important;
-webkit-transition-property: none !important;
transition-property: none !important;
/*CSS transforms*/
JS:
$(".accordeon dd").hide().prev().click(function() {
$(this).parents(".accordeon").find("dd").not(this).slideUp().prev().removeClass("active");
$(this).next().not(":visible").slideDown().prev().addClass("active");
});
CSS:
.accordeon .active { color: red }
HTML:
@agragregra
agragregra / goals.js
Created March 11, 2015 04:01
Цели
//Цели для Яндекс.Метрики и Google Analytics
$(".count_element").on("click", (function() {
ga("send", "event", "goal", "goal");
yaCounterXXXXXXXX.reachGoal("goal");
return true;
}));
@agragregra
agragregra / animate-css.js
Last active October 10, 2019 07:37
Animate CSS jQuery once animate
//Animate CSS + WayPoints javaScript Plugin
//Example: $(".element").animated("zoomInUp");
//Author URL: http://webdesign-master.ru
(function($) {
$.fn.animated = function(inEffect) {
$(this).css("opacity", "0").addClass("animated").waypoint(function(dir) {
if (dir === "down") {
$(this).addClass(inEffect).css("opacity", "1");
};
}, {
@agragregra
agragregra / easy-form-validator.js
Created March 21, 2015 15:52
Easy Form Validator
//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();
});
@agragregra
agragregra / index.html
Last active January 8, 2019 13:14
Google Map jQuery Theme
<!-- Google Map API -->
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=YOU-API-KEY&amp;sensor=false"></script>
@agragregra
agragregra / stopdrag.js
Created April 4, 2015 15:53
jQuery Stop Draggable Elements
$("img").on("dragstart", function(event) { event.preventDefault(); });
@agragregra
agragregra / masonry_imageloaded.js
Last active July 23, 2021 18:44
Masonry imagesLoaded
var $container = $(".masonry-container");
$container.imagesLoaded(function () {
$container.masonry({
columnWidth: ".item",
itemSelector: ".item"
});
});
@agragregra
agragregra / no-select.css
Created April 16, 2015 14:45
No Select CSS
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;