htaccess
Header set Access-Control-Allow-Origin "*"
Commands
apachectl -t
sudo service apache2 reload
a2enmod headers
sudo service apache2 restart
htaccess
Header set Access-Control-Allow-Origin "*"
Commands
apachectl -t
sudo service apache2 reload
a2enmod headers
sudo service apache2 restart
<input type="file" id="mypic" accept="image/*">
<form method="post" action="takephoto.php" enctype="multipart/form-data">
<input type="file" accept="image/*" name="file">
<input type="submit">
</form>
<script src="fruitsnow.js" type="text/javascript"></script>
<script type="text/javascript" src="http://beneposto.pl/jqueryrotate/js/jQueryRotateCompressed.js"></script>
<script type="text/javascript">
//<![CDATA[
window.onload = function() {
function timeouts() {
setTimeout(function () {
fruitfall();
timeouts();
}, 10000);
}
timeouts();
fruitfall();
var rotation = function (){
jQuery(".auglis1").rotate({
angle:0,
animateTo:360,
duration: 2000,
callback: rotation,
easing: function (x,t,b,c,d){
return c*(t/d)+b;
}
});
}
rotation();
var rotation2 = function (){
jQuery(".auglis2").rotate({
angle:360,
animateTo:0,
duration: 2000,
callback: rotation2,
easing: function (x,t,b,c,d){
return c*(t/d)+b;
}
});
}
rotation2();
};
//]]>
</script>
fruitsnow.js
for (i=1; i<9; i++){
jQuery("#clickban").after("<img id='br"+i+"' class='auglis"+Math.floor((Math.random() * 2) + 1)+"' src='/augli/"+i+".png' style='width:100px;z-index:-1;position:absolute;right:30px;top:-200px;'>");
}
function rightfall(kurs){
setTimeout(function(){
var bar1 = jQuery('#br'+kurs);
bar1.animate({top: jQuery(document).height()-200}, Math.floor((Math.random() * 10000) + (10000)), "linear", function() {
//bar1.hide();
bar1.css("top","-200px");
});
}, Math.floor((Math.random() * 8000) + ((kurs-1)*2000)));
}
for (i=1; i<9; i++){
jQuery("#clickban").after("<img id='fr"+i+"' class='auglis"+Math.floor((Math.random() * 2) + 1)+"' src='/augli/"+i+".png' style='width:100px;z-index:-1;position:absolute;left:30px;top:-200px;'>");
}
function leftfall(kurs){
setTimeout(function(){
var bar1 = jQuery('#fr'+kurs);
bar1.animate({top: jQuery(document).height()-200}, Math.floor((Math.random() * 10000) + (10000)), "linear", function() {
//bar1.hide();
bar1.css("top","-200px");
});
}, Math.floor((Math.random() * 8000) + ((kurs-1)*2000)));
}
function fruitfall(){
for (i=1; i<9; i++){
rightfall(i);
leftfall(i);
}
}
<video autoplay loop poster="polina.jpg" id="bgvid">
<source src="polina.webm" type="video/webm">
<source src="polina.mp4" type="video/mp4">
</video>
video#bgvid {
position: fixed;
top: 50%;
left: 50%;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
z-index: -100;
-webkit-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
background: url(polina.jpg) no-repeat;
background-size: cover;
}
@media screen and (max-device-width: 800px) {
body { background: url(polina.jpg) #000 no-repeat center center fixed; }
#bgvid { display: none; }
}
http://demosthenes.info/blog/777/Create-Fullscreen-HTML5-Page-Background-Video
ga('send','event','lapa','facebook','clicked')
ga('send','event','title','title2',{'nonInteraction': 1});
function resizeVideoPage(){
var width = 800;
var height = 600;
window.resizeTo(width, height);
window.moveTo(((screen.width - width) / 2), ((screen.height - height) / 2));
}
GET
$.ajax({
type:'GET',
url: 'http://www.kautkas.lv/kautkas.php',
data: "action=something&id="+id,
success:function(data){
$('#lauks').html(data);
}
});
POST
$.ajax({
type: "POST",
url: "ajax.php?",
data: { idnumurs: "id" },
success:function(data){
$("#lauks").val(data);
}
});
<script type="text/javascript" src="//sekomums.lv/cb.lv.js"></script>
<script type="text/javascript" src="//draugiem.lv/api/api.js"></script>
<script type="text/javascript">function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()}; r(function(){new ConversionsBox("Pat%C4%ABk%20radio%20SPIN%20FM%3F%20Seko%20mums%20ar%C4%AB%20Draugiem.lv!%20","mans-nosaukums");});</script>
$("iframe#twitter-widget-0").contents().find('head').append('<style>img.u-photo.avatar{display:none !important;}.header.h-card.p-author{padding-left:0;}</style>');
i use the “waituntilexists.js” plugin to detect when the content is added to DOM instead of the setTimout(): https://gist.github.com/buu700/4200601
$("iframe#twitter-widget-0").waitUntilExists(function(){
$("iframe#twitter-widget-0").contents().find('head').append('<style>img.u-photo.avatar{display:none !important;}.header.h-card.p-author{padding-left:0;}</style>');
});
function vissuzexceli(){
window.open('data:application/vnd.ms-excel,' + encodeURIComponent($('HTML').html()))
}