Reputation: 5781
i use this http://www.mudaimemo.com/p/quickedit/# and it work good the problem is i want use this is renaming some rows like this
my name ok!! (edit | delete| rename)
now this will be too many like that
1my name ok!! (edit | delete| rename)
2my name ok!! (edit | delete| rename)
3my name ok!! (edit | delete| rename)
4my name ok!! (edit | delete| rename)
5my name ok!! (edit | delete| rename)
6my name ok!! (edit | delete| rename)
and if i make each one like that
$(document).ready(function(){
// formnotifier
$('#1').quickEdit();
$('#2').quickEdit();
$('#3').quickEdit();
$('#4').quickEdit();
$('#5').quickEdit();
$('#6').quickEdit();
});
is there any way to make it like that
$('#rename').find().prev(".a").quickEdit();
i dont understand can any one make it for me the job is make it auto edit without repeat it
Upvotes: 0
Views: 717
Reputation: 195972
If you look at their examples they have in HTML
<span id="demoText1">This is a jQuery Quick Edit Demo1.</span>
<a href="/quickedit.php" id="demo1" rel="demoText1">edit this text.</a>
and they execute the javascript
$('#demo1').quickEdit();
To do this with multiple elements you just have to add a class to all a
elements and use that as the jquery selector ...
HTML
<span id="demoText1">This is a jQuery Quick Edit Demo1.</span>
<a href="/quickedit.php" class="quickedit" rel="demoText1">edit this text.</a>
<span id="demoText2">This is a jQuery Quick Edit Demo2.</span>
<a href="/quickedit.php" class="quickedit" rel="demoText2">edit this text.</a>
<span id="demoText3">This is a jQuery Quick Edit Demo3.</span>
<a href="/quickedit.php" class="quickedit" rel="demoText3">edit this text.</a>
Javascript
$('.quickedit').quickEdit();
Upvotes: 1
Reputation: 65254
by your example, I guess you are allowed to :
$('#1,#2,#3,#4,#5,#6').quickEdit();
Upvotes: 1