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
<a class="nav-twitter fa fa-twitter fa-2x" href="https://twitter.com/intent/tweet/?text=How to become a web developer in 3 days&url=http://www.fredericaerts.com/external/developer-in-3-days/&via=fredericAerts" target=“_blank"></a> |
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
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> | |
Show me some magic | |
</button> |
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
<!-- Modal --> | |
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> | |
<div class="modal-dialog"> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> | |
<h4 class="modal-title" id="myModalLabel">This is a bootstrap modal</h4> | |
</div> | |
<div class="modal-body"> | |
<p> |
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
$(window.document).ready(function() { | |
$('.tab-links-item').click(function() { | |
if( !$(this).hasClass('active') ) { | |
// update tabs | |
$(this).siblings().removeClass('active'); | |
$(this).addClass('active'); | |
// update panes | |
var $targetPane = $($(this).attr('href')); |
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
window.document.addEventListener('DOMContentLoaded', function() { | |
var tabLinks = window.document.querySelectorAll('.tab-links-item'); | |
var tabLinksArray = [].slice.call(tabLinks); | |
tabLinksArray.forEach(function(tabLink) { | |
tabLink.addEventListener('click', function(event) { | |
event.preventDefault(); | |
if(!tabLink.classList.contains('active')) { | |
// update tab links | |
tabLink.parentNode.querySelector('.tab-links-item.active').classList.remove('active'); | |
tabLink.classList.add('active'); |
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
window.document.addEventListener('DOMContentLoaded', function() { | |
var titleElement = document.querySelector('.hero-title'); | |
titleElement.textContent = 'Howdy, this title was generated by JavaScript'; | |
}); |
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
window.document.addEventListener('DOMContentLoaded', function() { | |
window.alert('The DOM tree is now available to your code'); | |
}); |
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 myVariable = 'Hello'; | |
var nameArray = ['Tom', 'Sara', 'Bob']; | |
var greetFunction = function(names) { | |
names.forEach(function(name) { | |
var greeting = myVariable + ' ' + name; | |
window.alert(greeting); | |
}); | |
} |
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 myVariable = 'Hello'; | |
var greetFunction = function(name) { | |
var greeting = myVariable + ' ' + name; | |
window.alert(greeting); | |
} | |
greetFunction('Tom'); | |
greetFunction('Sara'); | |
greetFunction('Bob'); |
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 myVariable = 'Hello'; | |
var greetingTom = myVariable + ' Tom'; | |
window.alert(greetingTom); | |
var greetingSara = myVariable + ' Sara'; | |
window.alert(greetingSara); | |
var greetingBob = myVariable + ' Bob'; | |
window.alert(greetingBob); |
NewerOlder