Hi Dave,

It appears that your method signature for attr function is incorrect.
See http://docs.jquery.com/Attributes for details (Looks like you're
passing in an anonymous function as the third parameter of the attr
function...this won't work.  You'd need to pass it in as the second
value -- this function serves to return a value to which the attribute
can be set.  So you'd omit 'true' in your case and replace with the
function that would return true or false -- that's why that function
is there.)  I suspect this is why your javascript execution stops
early

http://www.w3.org/TR/REC-html40/struct/links.html#edef-A Also note
that disabled is not a valid attribute for the anchor tag.  If you
want to disable a link, you might try creating another tag (a
paragraph tag perhaps) that contained your link text and swap them
out.  This would have the effect that it seems you're looking for.

Perhaps someone else will have something else to add.

Aaron

On Thu, Jun 4, 2009 at 4:50 PM, Dave Maharaj ::
WidePixels.com<d...@widepixels.com> wrote:
> 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:d...@widepixels.com]
> Sent: June-04-09 8:50 PM
> To: jquery-en@googlegroups.com
> 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

Reply via email to