ユーザーがリンクをクリックすると起動する関数があります。彼らが別のリンクをクリックしたとき、私は彼らがクリックした最初のリンクを変更したいと思います。どうすればこれを行うことができますか?これは私がこれまでに持っているものです:
$('a').click(function(){
//some code ...
if ( $(this).attr('id') != last.attr('id') ) {
$('a').click(function()
/*the original $this*/.parent().parent().quickFlipper({refresh: 0});
/*the original last*/.parent().parent().quickFlipper({refresh: 0});
});
var that = this;
var that2 = last;
setTimeout(function(){
$(that).parent().parent().quickFlipper({refresh :0});
$(that2).parent().parent().quickFlipper({refresh :0});
}, 1500);
//some more code ...
});
よろしくお願いします。私が何をしようとしているのかわからない場合は、質問してください。