load ajax + anchorfixed
This commit is contained in:
@@ -14,10 +14,16 @@ function click_link() {
|
||||
project_name = url[3];
|
||||
|
||||
if ($this.hasClass('open')) {
|
||||
|
||||
$this.removeClass('open');
|
||||
$('#item_list.'+ cat).remove();
|
||||
|
||||
} else {
|
||||
|
||||
$('#item_list').remove();
|
||||
$('.open').removeClass('open');
|
||||
$loader.css('display','inline-block');
|
||||
|
||||
$.ajax({
|
||||
url : '/' + page + '/' + cat, // La ressource ciblée
|
||||
type : 'GET', // Le type de la requête HTTP
|
||||
@@ -79,6 +85,8 @@ function click_list() {
|
||||
});
|
||||
|
||||
} else {
|
||||
$('#item_list').remove();
|
||||
$('.open').removeClass('open');
|
||||
|
||||
$.ajax({
|
||||
url : '/' + page + '/' + cat, // La ressource ciblée
|
||||
@@ -89,8 +97,6 @@ function click_list() {
|
||||
$(data).find('#item_list').addClass(cat).insertAfter($link_txt);
|
||||
$link_txt.addClass('open');
|
||||
lazy();
|
||||
anchor($href);
|
||||
|
||||
$('.card a').click(function (e) {
|
||||
e.preventDefault()
|
||||
})
|
||||
@@ -100,7 +106,6 @@ function click_list() {
|
||||
complete: function(data) {
|
||||
console.log('cat', cat);
|
||||
var $link_card = $('.card > #'+project_name + ' a');
|
||||
|
||||
setTimeout( function(){
|
||||
console.log('project_name', project_name);
|
||||
console.log('$link_card', $link_card);
|
||||
@@ -119,7 +124,7 @@ function click_list() {
|
||||
complete: function(data) {
|
||||
marg_item(project_name);
|
||||
closeAjax();
|
||||
|
||||
anchor($href);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user