[IMP]improved animation for drodown

bzr revid: mba@tinyerp.com-20140224133959-idr1pqp5imhudldv
This commit is contained in:
Mahendra Barad (OpenERP) 2014-02-24 19:09:59 +05:30
parent 1e9664d74c
commit eb30747335
2 changed files with 10 additions and 2 deletions

View File

@ -2,6 +2,14 @@ $(document).ready(function() {
var discussion = false;
var share = false;
var node = $('#fa-angle-down')
var stickyTop = node.offset().top - 50;
$(window).scroll(function(event){
var scrolltop = $(window).scrollTop()
if (stickyTop > scrolltop)
node.stop().animate({"marginTop": ($(window).scrollTop() - 50) + "px"}, "slow" );
});
var def = $.Deferred();
openerp.jsonRpc("/blogpsot/get_custom_options", 'call', {
}).then(function(res){

View File

@ -193,8 +193,8 @@
<img class="img-circle" t-att-src="'/website/image?model=res.users&amp;field=image_small&amp;id='+str(blog_post.create_uid.id)" style="width: 30px; margin-right: 10px;"/>
<small id="blog_author" t-field="blog_post.create_uid.name"/><br/>
</div>
<div t-if="blog_post.content_image">
<a href="#blog_content" class="fa fa-angle-down fa-2x fa-inverse mt32"/>
<div t-if="blog_post.content_image" id="fa-angle-down">
<a href="#blog_content" class="fa fa-angle-down fa-2x fa-inverse mt64"/>
</div>
</div>
</div>