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
$('input:text, textarea').each(function(){ | |
var $this = $(this); | |
$this.data('placeholder', $this.attr('placeholder')) | |
.focus(function(){$this.removeAttr('placeholder');}) | |
.blur(function(){$this.attr('placeholder', $this.data('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 addPlaceValue(nStr) | |
{ | |
nStr += ''; | |
x = nStr.split('.'); | |
x1 = x[0]; | |
x2 = x.length > 1 ? '.' + x[1] : ''; | |
var rgx = /(\d+)(\d{3})/; | |
while (rgx.test(x1)) { | |
x1 = x1.replace(rgx, '$1' + '.' + '$2'); | |
} |
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
/*! | |
* numeral.js language configuration | |
* language : Hungarian (hu) | |
* source : Peter Bakondy : https://github.com/pbakondy | |
* author : Horváth Tamás András | |
*/ | |
(function () { | |
var language = { | |
delimiters: { | |
thousands: '.', |
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
body.modal-open, .modal-open .modal-open { | |
margin-right: -15px; | |
} |
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
$('.inputs').keydown(function (e) { | |
if (e.which === 13) { | |
var index = $('.inputs').index(this) + 1; | |
$('.inputs').eq(index).focus(); | |
} | |
}); |
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 ($) { | |
function render_map($el) { | |
var $markers = $el.find('.marker'); | |
// Add custom data-zoom | |
window.gmapzoom = parseInt($markers.attr('data-zoom')); | |
if ( isNaN(window.gmapzoom) ) { window.gmapzoom = 16; } |
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 | |
/* | |
* A walker class to use that extends wp_dropdown_categories and allows it to use the term's slug as a value rather than ID. | |
* | |
* See http://core.trac.wordpress.org/ticket/13258 | |
* | |
* Usage, as normal: | |
* wp_dropdown_categories($args); | |
* |
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 get_custom_categories($slug) { | |
$args = array( | |
'hide_empty' => 1, | |
'orderby' => 'name', | |
'show_count' => 0, | |
'pad_counts' => 0, | |
'hierarchical' => 1, | |
'taxonomy' => $slug, | |
'title_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
function remove_a_tag($string, $postid, $slug = true) { | |
$return = array(); | |
preg_match_all("/<a.*?>(.*?)<\/a>/", $string, $matches); | |
foreach ($matches[1] as $key => $value) { | |
if ($slug == true) { | |
$return[] = sanitize_title($value); |
OlderNewer