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
<!-- | |
From the child component, you want to do an "emit". | |
This tells the parent to run the callback specified | |
in the child component reference. Psuedo code: | |
--> | |
<child> | |
<button @click="send()">Click Me</button> | |
methods: { |
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
.replace(/[^0-9]/g, ''); | |
exapmle | |
var val = $(this).prop("value").replace(/[^0-9]/g, ''); | |
/** | |
** Input Number | |
**/ | |
inputNumber: function(){ |
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
/* ============================================== | |
Name function | |
============================================== */ | |
if($("form").length){ | |
$('form').submit(function(e) { | |
e.preventDefault(); |
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
/* basic table sticky*/ | |
.wrapp_table_sticky{ | |
overflow: hidden; | |
} | |
.wrapp_table_sticky .inner_table_sticky{ | |
overflow: auto; | |
padding: 20px 0; | |
margin: -20px 0; |
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(){ | |
$('section[data-type="background"]').each(function(){ | |
var $bgobj = $(this); // создаем объект | |
$(window).scroll(function() { | |
var ypos = -($window.scrolltop() / $bgobj.data('speed')); // вычисляем коэффициент | |
// присваиваем значение background-position | |
var coords = 'center '+ ypos + 'px'; | |
// создаем эффект parallax scrolling | |
$bgobj.css({ backgroundposition: coords }); |
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
/** | |
** nextOpen | |
**/ | |
accordion: function(){ | |
var self = this; | |
$(".set > a").on("click", function(){ |
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
self.jqueryExtend(); | |
/* | |
* | |
* | |
* Accordion | |
* | |
*/ |
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
Если e.target - это тот же самый элемент, что и this, вы не нажали на потомка. | |
$('.foobar').on('click', function(e) { | |
if (e.target !== this){ | |
return; | |
}; | |
alert( 'clicked the foobar' ); |
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(){ | |
if($("#include_header").length){ | |
$("#include_header").load("include/header.html"); | |
}; | |
if($("#include_header").length){ | |
$.get('header.html',function(response){ | |
$('#header').html(response); |
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
// ========================================================================== | |
// Spy category | |
// ========================================================================== | |
if (screen.width <= 720) { | |
function spyCategory() { | |
$('.spy_category_item').each( function () { |
NewerOlder