에 링크 입력 변환 :스크립트는 다음과 같이 수행 순간 JQuery와
링크 편집에- 클릭하여 링크 편집 이전/다음 링크를 가시 입력
- 클릭함으로써 링크 입력을 볼 수
편집하려면 링크를 한 번 클릭하지만 새 창에서 페이지를 열 때 및 편집하려면 두 번 클릭하면 싶습니다.
여기 스크립트입니다 :
에 링크 입력 변환 :스크립트는 다음과 같이 수행 순간 JQuery와
링크 편집에편집하려면 링크를 한 번 클릭하지만 새 창에서 페이지를 열 때 및 편집하려면 두 번 클릭하면 싶습니다.
여기 스크립트입니다 :
http://jsfiddle.net/jaspermogg/pFyNY/1/ - 당신은 편집 사업부를 더블 클릭, 또는 단일 열 수있는 링크를 클릭 할 수 있습니다. 그게 니가 원하는거야?
$('.a0').dblclick(function(e){
e.preventDefault();
$(this).parent().find('input').val($(this).find('a').text()).show().focus();
$(this).hide();
})
$('#url0, #url1').each(
function(index, element){
$(element).blur(function(){
$(this).hide().prev().show().find('a').html(this.value);
})
}
);
그리고 여기 당신이
http://jsfiddle.net/jaspermogg/pFyNY/2/
가 여기에 jsFiddle의 다음 :-)에게 뭘 하려는지의 그 단지의 경우, 당신이 그것을 편집 한 값으로 a
의 HREF를 변경하는 jsFiddle입니다 0,123,927,215에서 영감을
$('.a0 a').click(function(){
var href = $(this).attr('href');
// Redirect only after 500 milliseconds (CHANGE THE 500 IN THE CODE TO DETERMINE HOW LONG THE USER GETS TO DBLCLICK)
if (!$(this).data('timer')) {
$(this).data('timer', setTimeout(function() {
window.location = href;
}, 500));
}
return false; // Prevent default action (redirecting)
});
$('.a0').dblclick(function(){
clearTimeout($(this).find('a').data('timer'));
$(this).find('a').data('timer', null);
$(this).parent().find('input').val($(this).find('a').text()).show().focus();
$(this).hide();
})
$('#url0, #url1').each(
function(index, element){
$(element).blur(function(){
$(this).hide().prev().show().find('a').html(this.value);
})
}
);
-http://jsfiddle.net/jaspermogg/pFyNY/5/
JS를 - 그게 당신이 원하는 것을
은 dblclick()''에 의해') ('.click를 교체하는 링크 여기
을 편집? – Ryan