– You Don’t Know JS – free ebook series about Javascript

This is a series of books diving deep into the core mechanisms of the JavaScript language. The first edition of the series is now complete.


Read online (free!): “Up & Going”,
Read online (free!): “Scope & Closures”,
Read online (free!): “this & Object Prototypes”,
Read online (free!): “Types & Grammar”,
Read online (free!): “Async & Performance”,
Read online (free!): “ES6 & Beyond”,

Ajax site – sub page url things

Change browser url without page reloading: http://www.tinywall.info/2012/02/change-browser-url-without-page-reload-refresh-with-ajax-request-using-javascript-html5-history-api-php-jquery-like-facebook-github-navigation-menu.html

Demo: http://demo.tinywall.info/html5-history-api/menu1.php

How to make AJAX URLs Crawlable: http://ajax.rswebanalytics.com/seo-for-ajax/#!ajax-crawlable-urls

Solutions to 5 Common Ajax Problems: http://www.webdesignerdepot.com/2009/12/solutions-to-5-common-ajax-problems/

Changing the browser-URL without refreshing page: http://spoiledmilk.com/blog/html5-changing-the-browser-url-without-refreshing-page/

jquery: change the URL address without redirecting? [duplicate]: http://stackoverflow.com/questions/6478485/jquery-change-the-url-address-without-redirecting

Making AJAX applications crawlable: https://developers.google.com/webmasters/ajax-crawling/docs/learn-more

Crossroads.js is a routing library: http://millermedeiros.github.io/crossroads.js/

History.js example with JQuery

Good but it is better using Cookie at complexed page.
<!DOCTYPE html>
<meta http-equiv=”content-type” content=”text/html; charset=UTF-8″>
<title>Simple History.js Ajax example </title>

<script type=”text/javascript” src=”http://code.jquery.com/jquery-1.8.2.js”></script>
<script type=”text/javascript” src=”https://browserstate.github.io/history.js/scripts/bundled/html4+html5/jquery.history.js”></script>


<ul class=”content_links”>
<li><a href=”page_1.html”>Content page 1</a></li>
<li><a href=”page_2.html”>Content page 2</a></li>

<div id=”content”>
<p>Content within this box is replaced with content from supporting pages using javascript and AJAX.

$(function() {

// Prepare
var History = window.History; // Note: We are using a capital H instead of a lower h
if ( !History.enabled ) {
// History.js is disabled for this browser.
// This is because we can optionally choose to support HTML4 browsers or not.
return false;

// Bind to StateChange Event
History.Adapter.bind(window,’statechange’,function() { // Note: We are using statechange instead of popstate
var State = History.getState();
/* Instead of the line above, you could run the code below if the url returns the whole page instead of just the content (assuming it has a `#content`):
$.get(State.url, function(response) {
$(‘#content’).html($(response).find(‘#content’).html()); });

// Capture all the links to push their url to the history stack and trigger the StateChange Event
$(‘a’).click(function(evt) {
History.pushState(null, $(this).text(), $(this).attr(‘href’));


source: https://github.com/browserstate/history.js/

Google Maps JavaScript API – samples

Adding a Google Map with a Marker to Your Website : https://developers.google.com/maps/documentation/javascript/adding-a-google-map

Jquery Google Map http://tilotiti.github.io/jQuery-Google-Map/

jQuery Geocoding and Places Autocomplete Plugin http://ubilabs.github.io/geocomplete/

Get Coordinates of address http://stackoverflow.com/questions/3652951/google-maps-api-get-coordinates-of-address


Places search box https://developers.google.com/maps/documentation/javascript/examples/places-searchbox

Load picture gallery in jQuery dialog

<script type=”text/javascript”>
$(document).ready(function() {

$(‘.pic_gallery’).click(function() {
// console.log($(this).attr(‘id’).substr(5));
//change dialog iframe id href
url = “{{ URL::to(‘/picture/list’)}}” + “/” + $(this).attr(‘id’).substr(5);
//  console.log(‘url: ‘ + url);
$(“#dialog_iframe”).attr(“src”, url)

//simple page load
// $(“#dialog2”).load(url);
//  $(“#dialog2”).dialog(“open”);

autoOpen: false,
position: ‘center’,
title: ‘EDIT’,
draggable: true,
width: 700,
height: 450,


<div id=”dialog” style=”display:none;” title=”Dialog Title”><iframe id=”dialog_iframe” frameborder=”0″ scrolling=”no” width=”650″ height=”400″ src=””></iframe></div>

<a class=”pic_gallery” id=”link_{{$user->users_id}}” href=”#” > Click gallery </a>