Skip to content

Instantly share code, notes, and snippets.

View andrew-mykhalchuk's full-sized avatar
🏠
Working from home

Andrew Mykhalchuk andrew-mykhalchuk

🏠
Working from home
View GitHub Profile
<%@ page trimDirectiveWhitespaces="true" %>
jQuery.fn.exists = function(){ return this.length > 0; }
if ($(selector).exists()) {
// Do something
}
$(document).ready(function(){
var page_url = window.location.href;
var fbAPI = "http://graph.facebook.com/?id=" + page_rul;
$.getJSON( fbAPI, {
format: "json"
})
.done(function( data ) {
$(".share-count").text(data.share.share_count);
});
});
input[type=range] {
-webkit-appearance: none;
margin: 18px 0;
width: 100%;
}
input[type=range]:focus {
outline: none;
}
input[type=range]::-webkit-slider-runnable-track {
width: 100%;