small bug fixed for auto scroll
This commit is contained in:
parent
a87df693bf
commit
e8b90639c6
|
@ -229,21 +229,23 @@ $(document).ready(function(){
|
|||
if(window.location.hash != ""){
|
||||
var item = window.location.hash.replace("#","");
|
||||
el = $("div[data-scroll-id=" + item + "]");
|
||||
$('html, body').scrollTop(el.offset().top - 100);
|
||||
el.addClass("scroll-element");
|
||||
$.ajax({
|
||||
url : "/admin/comments/read",
|
||||
dataType : "json",
|
||||
type : "post",
|
||||
data : {"response_id" : item.split("_")[1]}
|
||||
}).done(function(data){
|
||||
if(data.success){
|
||||
el.find("img[data-avatar-id="+ data.user_id +"]").addClass("read");
|
||||
}
|
||||
})
|
||||
el.one("mouseover",function(){
|
||||
el.css('border-color', 'transparent');
|
||||
})
|
||||
if(el.length > 0){
|
||||
$('html, body').scrollTop(el.offset().top - 100);
|
||||
el.addClass("scroll-element");
|
||||
$.ajax({
|
||||
url : "/admin/comments/read",
|
||||
dataType : "json",
|
||||
type : "post",
|
||||
data : {"response_id" : item.split("_")[1]}
|
||||
}).done(function(data){
|
||||
if(data.success){
|
||||
el.find("img[data-avatar-id="+ data.user_id +"]").addClass("read");
|
||||
}
|
||||
})
|
||||
el.one("mouseover",function(){
|
||||
el.css('border-color', 'transparent');
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
$(".member_tags").select2({
|
||||
|
|
Loading…
Reference in New Issue