Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#pageContent').animate({height: 'hide'});
- $.ajax({
- // ...
- success: function() {
- $('#pageContent').animate({
- height: 'show'
- });
- }
- })
- ;(function ( $, window, document, undefined ) {
- jQuery(document).ready(function($){
- $.ajaxSetup({cache:false});
- var previousTarget=null;
- var column = $('#columns').find('.column');
- $('#columns').find('a').click(function(e) {
- e.preventDefault()
- });
- column.click(function(){
- pageurl = $(this).attr('href');
- if (!$(this).hasClass('animated')) {
- column.not($(this).parent()).dequeue().stop().animate({
- width : 'toggle',
- opacity: '0.5'
- }, 1400, 'linear', function () {
- if (pageurl != window.location) {
- window.history.pushState({path: pageurl}, '', pageurl);
- }
- });
- }
- }, function() {
- if (this==previousTarget) {
- return;
- } else {
- $(this).addClass('animated');
- column.not($(this).parent()).dequeue().stop().animate({
- width : 'toggle',
- opacity: '0.5'
- }, 1400, 'linear', function () {
- $(this).removeClass('animated').dequeue();
- var post_id = $(this).find('a').attr("rel")
- $("#page-container").html("loading...");
- $("#page-container").load("http://<?php echo $_SERVER[HTTP_HOST]; ?>/ajax/", {id: post_id},function(){
- $('#page-container').trigger('create');
- });
- $('.bar').attr('href', '/');
- previousTarget=this;
- return false;
- });
- var space = ($(window).width() - 200);
- $(this).dequeue().stop().animate({
- width:(space/4)
- },1400,'linear');
- }
- });
- });
- })( jQuery, window, document );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement