[IMP]page transition reoload

bzr revid: mba@tinyerp.com-20140211132348-p5y0vo58e7keagcr
This commit is contained in:
Mahendra Barad (OpenERP) 2014-02-11 18:53:48 +05:30
parent b39c20e721
commit 9a8afd1584
2 changed files with 28 additions and 12 deletions

View File

@ -47,6 +47,7 @@ p.post-meta {
color: white;
padding-top: 10%;
margin-bottom: 8px;
cursor: pointer;
}
.page_fadeup_out {

View File

@ -2,10 +2,10 @@ $(document).ready(function() {
$("#blog_content p").inlineDisqussions(); //Allow inline comments on blog post
$('.js_next').click(function(event) {
$('.cover_footer').click(function(event) {
event.preventDefault();
var translationValue = $('.cover_footer').get(0).getBoundingClientRect().top;
newLocation = this.href;
newLocation = $(this).find('.js_next')[0].href;
$('.blog_cover').addClass('page_fadeup_out');
$('.cover_footer')
@ -24,16 +24,31 @@ $(document).ready(function() {
});
}
$('a[href^="#"]').on('click',function (e) {
e.preventDefault();
var target = this.hash,
$target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 900, 'swing', function () {
window.location.hash = target;
$(document).on('mouseover',function() {
$('.cover_footer').click(function(event) {
event.preventDefault();
var translationValue = $('.cover_footer').get(0).getBoundingClientRect().top;
newLocation = $(this).find('.js_next')[0].href;
$('.blog_cover').addClass('page_fadeup_out');
$('.cover_footer')
.addClass('page_upward')
.css({ "transform": "translate3d(0, -"+ translationValue +"px, 0)" })
.fadeIn(900, newpage);
$("html, body").stop().animate({ scrollTop: $("#wrap").offset().top }, 'slow', 'swing');
});
$('a[href^="#"]').on('click',function (e) {
e.preventDefault();
var target = this.hash,
$target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 900, 'swing', function () {
window.location.hash = target;
});
});
});
});