-1
編集できますが他を編集し、私は私は申し訳ありませんがたくさん欠けている知っているjqueryのタイトルは...私はタイルを選択するために、ワン
をしたい内容を入力できるようにするには、他のとドロップダウン
タイトル
編集できますが他を編集し、私は私は申し訳ありませんがたくさん欠けている知っているjqueryのタイトルは...私はタイルを選択するために、ワン
をしたい内容を入力できるようにするには、他のとドロップダウン
タイトル
$(document).ready(function() {
$('.dropdown').live('mouseenter', function() {
$('.sublinks').stop(false, true).hide();
var submenu = $(this).parent().next();
submenu.css({
position: 'absolute',
top: $(this).offset().top + $(this).height() + 'px',
left: $(this).offset().left + 'px',
zIndex: 1000
});
submenu.stop().slideDown(300);
submenu.mouseleave(function() {
$(this).slideUp(300);
$('a#other').focus(function() {
$('#change').blur();
});
});
});
$('#tbOthers').live('keypress focusout', function (e) {
var textTitle = $.trim($(this).val());
if (e.type === 'keypress') {
if ((e.keyCode ? e.keyCode : e.which) === 13) {
if (textTitle.length === 0) {
$(this).replaceWith('<a href="#" class="dropdown" id="change">Title</a>');
}
else {
$(this).replaceWith('<a href="#" class="dropdown" id="change">' + textTitle + '</a>');
}
}
} else if (e.type === 'keypress') {
if (textTitle.length === 0) {
$(this).replaceWith('<a href="#" class="dropdown" id="change">Title</a>');
}
else {
$(this).replaceWith('<a href="#" class="dropdown" id="change">' + textTitle + '</a>');
}
}
});
$('#mainLink').find('.sublinks a').live('click', function (e) {
var objChange = $('#mainLink').find('#change');
if ($(this).attr('id') === 'other') {
objChange.parent().append($('<input />', { 'id': 'tbOthers', 'type': 'text' }));
objChange.remove();
}
else {
objChange.text($(this).text());
}
});
});
ライブデモのリンクをご覧ください:http://jsfiddle.net/nanoquantumtech/QSzhx/ – Thulasiram
私はuが何をしたいのuを取得していませんか? – Thulasiram
ああ、申し訳ありません。私はタイルを選択して他のものを編集することができる他の – DD77
を編集できるようにしたい。私はテキストのようにいくつかの値を入力することができるいくつかのテキストボックスを表示し、Testのオプションが必要です。あなたはこれを求めている? – DD77