Skip to content

Commit

Permalink
bug fixes, updated README
Browse files Browse the repository at this point in the history
Signed-off-by: Michele Salvini <info@slv.dj>
  • Loading branch information
Michele Salvini committed May 6, 2013
1 parent 3186c7d commit 44b820f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Expand Up @@ -117,18 +117,20 @@ Javascript Library for manage url changes in browser. jQuery needed
{
// suppose to get the content of div with id="content" of next page and inject into the div with id="content"
// in current page
var newContent = $("#content", $('<div></div>').html(changeObj.data).html());
var newContent = $("#content", $('<div></div>').html(changeObj.data));

// fade out container div
$("#content").fadeOut(600);
$("#content").fadeOut(600, function () {
$("#content").html(newContent.html());
});

// return integer (milliseconds) to wait for finish fadeOut
return 600;
},
nextLocationInit: function (changeObj)
{
// inject newContent and fade in
$("#content").html(newContent).fadeIn(600);
$("#content").fadeIn(600);

// return integer (milliseconds) to wait for finish fadeOut
return 600;
Expand Down
4 changes: 2 additions & 2 deletions example/assets/script.js
Expand Up @@ -42,10 +42,10 @@ jQuery(document).ready(function ($) {
nextLocationInit: function (changeObj)
{
$('<p>- new page is ready, new html is injected, now we can start animations</p>').css('height', 0).appendTo($("#logs")).animate({height: 16});
var txt = $("#content", $('<div></div>').html(changeObj.data)).html();
var txt = $("#content", $('<div></div>').html(changeObj.data));
document.title = changeObj.toTitle;

$("#content").html(txt).fadeIn(600);
$("#content").html(txt.html()).fadeIn(600);
return 600;
},
locationDidChange: function (changeObj)
Expand Down

0 comments on commit 44b820f

Please sign in to comment.