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
jQuery(document).ready(function(){ | |
if (window.location.hash) { | |
var hashdata = new Object(); | |
jQuery.each(window.location.hash.replace(/^#/,'').split('&'), function(i, t){ | |
var s = t.split('='); | |
hashdata[s[0].toLowerCase()] = s[1].toLowerCase(); | |
}); | |
var $filters = jQuery('div[id^="Filters"]').find('li'); | |
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
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561 | |
/* | |
* How to delete items from an Array in JavaScript, an exhaustive guide | |
*/ | |
// DON'T use the delete operator, it leaves a hole in the array: | |
var arr = [4, 5, 6]; | |
delete arr[1]; // arr now: [4, undefined, 6] |
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> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> | |
</head> | |
<body> |
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>OpenSeadragon Basic Demo</title> | |
<script type="text/javascript" src='../../build/openseadragon/openseadragon.js'></script> | |
<script type="text/javascript" src='../lib/jquery-1.9.1.min.js'></script> | |
<script type="text/javascript" src='../lib/jquery-ui-1.10.2/js/jquery-ui-1.10.2.min.js'></script> | |
<link rel="stylesheet" href="../lib/jquery-ui-1.10.2/css/smoothness/jquery-ui-1.10.2.min.css" /> | |
<style type="text/css"> | |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script> | |
</head> | |
<body> | |
<div id="mydiv" ></div> | |
<script src="jquery.myplugin.js" ></script> | |
<script> | |
$("#mydiv").myplugin({ | |
debug: true, |
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 | |
add_filter( 'the_content', 'remove_empty_p', 20, 1 ); | |
function remove_empty_p( $content ){ | |
// clean up p tags around block elements | |
$content = preg_replace( array( | |
'#<p>\s*<(div|aside|section|article|header|footer)#', | |
'#</(div|aside|section|article|header|footer)>\s*</p>#', | |
'#</(div|aside|section|article|header|footer)>\s*<br ?/?>#', | |
'#<(div|aside|section|article|header|footer)(.*?)>\s*</p>#', | |
'#<p>\s*</(div|aside|section|article|header|footer)#', |
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 b() { | |
$selector: str-slice(inspect(&), 2, -2); | |
@each $type in '__', '--' { | |
@if str-index($selector, $type) { | |
$selector: str-slice($selector, 0, str-index($selector, $type) - 1); | |
} | |
} | |
@return $selector; | |
} |
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 b() { | |
$selector: str-slice(inspect(&), 2, -2); | |
@each $type in '__', '--' { | |
@if str-index($selector, $type) { | |
$selector: str-slice($selector, 0, str-index($selector, $type) - 1); | |
} | |
} | |
@return $selector; | |
} |
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
let items = new Intl.PluralRules('ru-RU'); | |
let result,word; | |
for(var i = 0;i<25;i++){ | |
if(items.select(i)=='one'){ | |
word = 'шаурма'; | |
} | |
if(items.select(i)=='few'){ | |
word = 'шаурмы'; | |
} | |
if(items.select(i)=='many'){ |
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
// Add on element with overflow | |
-webkit-mask-image: -webkit-radial-gradient(white, black); |
OlderNewer