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
location = { | |
host: "stackoverflow.com", | |
hostname: "stackoverflow.com", | |
href: "http://stackoverflow.com/questions/2300771/jquery-domain-get-url", | |
pathname: "/questions/2300771/jquery-domain-get-url", | |
port: "", | |
protocol: "http:" | |
} | |
location.host // would be the domain |
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 () { | |
$('_btnBrowse').click(function (e) { | |
e.preventDefault(); | |
$('#inputUpload').click(); | |
}); | |
$('#inputUpload').change(function () { | |
var filename = $('input[type=file]').val().split('\\').pop(); | |
var setContent = $('.inputFile').html(filename); | |
}); |
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
// Check if plugin is ready to call | |
function checkVendor(vendor, selector, options) { | |
if (!jQuery()[vendor]) { | |
console.log('ERROR: obsadź plugin: ' + vendor); | |
} else { | |
$(selector)[vendor](options); | |
} | |
} | |
// Example use |
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
/* | |
* get URL parameter | |
*/ | |
function GetURLParameter(sParam) { | |
var sPageURL = window.location.search.substring(1); | |
var sURLVariables = sPageURL.split('&'); | |
for (var i = 0; i < sURLVariables.length; i++) { | |
var sParameterName = sURLVariables[i].split('='); | |
if (sParameterName[0] == sParam) { | |
return sParameterName[1]; |
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 () { | |
var locationHashObjTop = false; | |
$('input[type="submit"]').on('click', function () { | |
var $locationHashObj = $(this).prev(); | |
var locationHash = '#' + $(this).prev().attr('id'); | |
locationHashObjTop = $locationHashObj.offset().top; | |
sessionStorage.setItem('fileHash', locationHash); |
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
var defaults = { | |
radius: 25, | |
defaultradius: 0, | |
enableTilt: true, | |
tilt: 20, | |
random: true, | |
randomMax: 25, | |
colors: ['4AC7ED', 'FDC015', '9F78EC', 'F25C33'] | |
}; |
NewerOlder