OK forget previous post....
How can I disable all links with $('a[class^="edit_"]') after one is
clicked?
what I did was fade the other buttons out when 1 is clicked. But how can I
disable the buttons temporarily?
I added$('a[class^="edit_"]').attr("disabled",true , function() { to my
script but thats stops the action and nothing happens after that line is
run.
$('a[class^="edit_"]').click(function(){
var url_id = $(this).attr('href');
var x = $(this).attr('id').split('_');
var y = x[0];
var z = x[1];
$('a[class^="edit_"]').fadeTo('slow' , 0.25 , function() {
$('a[class^="edit_"]').attr("disabled",true , function() {
$('#resume_'+z).slideUp( 500 , function(){
$('#loading_'+z).show('fast', function() {
$('#resume_'+z).load( url_id , function(){
$('#loading_'+z).hide(function(){
$('#resume_'+z).slideDown( 500 , function() {
$('#resume_'+z).fadeTo('fast', 1, function() {
$('#resume_'+z).fadeIn('slow');
});
});
});
return false;
});
});
});
});
});
});
_____
From: Dave Maharaj :: WidePixels.com [mailto:[email protected]]
Sent: June-04-09 8:50 PM
To: [email protected]
Subject: [jQuery] Complicated setup help.
I have run into a problem.
I have
<li id="set_1" class="entry">
<dl>
<dt>Heading</dt>
<dd class="skills"> Sample here</dd>
</dl>
</li>
<div class="edit_profile"> Edit</div>
<div class="clear"></div>
<li id="set_2" class="entry">
<dl>
<dt>Heading</dt>
<dd class="skills"> Sample here</dd>
</dl>
</li>
<div class="edit_settings"> Edit</div>
<div class="clear"></div>
same thing as above for 3 other sections......
Click edit loads an ajax submitted form (jQuery form Plugin from malsup)
into the <li id="set_XXX" class="entry"></div> so all the <dl> is replaced
by the form..submit and the new <dl> data is updated.
But if a user clicks edit for set 1 then edit for set 2,3,4,and 5 all 5 divs
are updated with forms, the page is now long and ugly and the forms will not
submit. Easiest way would be to close each set+xx if they click on another
edit link but how can i tell a set has an open form and how can i return the
original data?
I was thinking of an accordian style setup where if user clicks on another
edit any open sets will be closed.
Ideas? Thoughts? Suggestions?
thanks,
Dave