Created
July 5, 2016 12:45
-
-
Save pascal-codecat/23ed53ec9a32830753b524d7eb6011a4 to your computer and use it in GitHub Desktop.
ilikerocket file
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
// START TWITTER FACEBOOK | |
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0], | |
p=/^http:/.test(d.location)?'http':'https'; | |
if(!d.getElementById(id)){js=d.createElement(s); | |
js.id=id;js.src=p+'://platform.twitter.com/widgets.js'; | |
fjs.parentNode.insertBefore(js,fjs);}} | |
(document, 'script', 'twitter-wjs'); | |
(function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); js.id = id; | |
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.6"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk')); | |
// END TWITTER FACEBOOK | |
// START LISTENER | |
$("#button-submit").on("click", function(){ | |
var comment = $(".message-box").val(); | |
var textemty = $(".message-box").val(); | |
if (textemty === "") { | |
$(".message-box").css("border", "3px solid red"); | |
} else { | |
$("#visible-comment").html(comment); | |
$(".message-box").hide(400); | |
}; | |
return false; | |
}); | |
$(".message-box").on("keyup", function() { | |
console.log("keyup happened"); | |
var nameName = 3; | |
var name = "string"; | |
var charCount = $(".message-box").val().length; | |
$("#char-count").html(charCount); | |
if(charCount > 50) { | |
$("#char-count").css("color","red"); | |
} else { | |
$("#char-count").css("color","white"); | |
}; | |
}); | |
// END LISTENER | |
// START MAPS | |
var map; | |
function initMap() { | |
map = new google.maps.Map(document.getElementById('map'), { | |
center: {lat: 47.6586018, lng: 9.4317064}, | |
zoom: 15 | |
}); | |
} | |
// marker | |
function initMap() { | |
var myLatLng = {lat: 47.6593018, lng: 9.4339064}; | |
var map = new google.maps.Map(document.getElementById('map'), { | |
zoom: 15, | |
center: myLatLng | |
}); | |
var marker = new google.maps.Marker({ | |
position: myLatLng, | |
map: map, | |
title: 'Hello World!' | |
}); | |
} | |
// START MAPS | |
// READY | |
$(document).ready(function(){ | |
// READY | |
// START WORK SECTION | |
for(var i = 0; i < works.length; ++i) { | |
$("#work").append("\ | |
<div class='col-lg-3 col-md-6 col-xs-12'>\ | |
<div class='work-kitten'>\ | |
<a href=" + works[i].url + " class='work-img'>\ | |
<img class='img-responsive' src='" + works[i].pic + "'>\ | |
<span class='info'><p class='proj-title'>Title:</p> "+ works[i].title +" </span>\ | |
</a>\ | |
</div>\ | |
</div>\ | |
"); | |
var images = $("#work img"); | |
if (i%2 === 0) { | |
$(images[i]).css("border", "3px solid white"); | |
} else { | |
$(images[i]).css("border", "3px solid white"); | |
}; | |
}; | |
$(".work-img").mouseenter( function() { | |
$(".info", this).show(); | |
}).mouseleave(function(){ | |
$(".info", this).hide(); | |
}); | |
// END WORK SECTION | |
// START STELLAR | |
$.stellar(); | |
// END STELLAR | |
// START TOOLTIP | |
$(function () { | |
$('#item1').tooltip(); | |
}); | |
$(function () { | |
$('[data-toggle="tooltip"]').tooltip(); | |
}); | |
// END TOOLTIP | |
// START SMOOTH SCROLLING | |
var $root = $('html, body'); | |
$('.navbar-nav a').click(function() { | |
var href = $.attr(this, 'href'); | |
$root.animate({ | |
scrollTop: $(href).offset().top | |
}, 500, function () { | |
window.location.hash = href; | |
}); | |
return false; | |
}); | |
// END SMOOTH SCROLLING | |
// READY | |
}); | |
// READY |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment