title: jeditable edit all sections?
body: <p>I am trying to figure out how to edit all the areas with a certain class with 1 edit button. </p>
  
  <p>This is my JS: I threw it into a function to be used over again. 
  I have a surrounding div and inside of it are spans with classes of "details"</p>
  
  <p>How do I create 1 button "edit" and have them all trigger at one time?
  Trying to simulate the facebook effect where if you click a section the whole section becomes editable. Not sure how that is done.</p>
  
  <pre><code>function editProfileText(url, selector, type, data) {
        $(selector).editable(url, { 
          cssclass : 'inline-edit',
          //data   : data,
          id   : 'elementid',
          name : 'elementvalue',
          indicator : '&lt;img src="/assets/images/ajax-loader.gif"&gt;',
          tooltip   : 'Click to edit...',
          submit: 'Save',
          event: "edit",
          //onblur : 'ignore',
          type: type
  
   });
  
   }   
      //Link for Text Only
      $('a.edit').live('click', function(){
          editProfileText("profile/editprofile", "span.detail" , "text", "");
          $(this).prev().trigger("edit");
      });
  </code></pre>
  
  <p><strong>Solution:</strong></p>
  
  <pre><code>function editProfileText(url, selector, type, data) {
            $(selector).editable(url, { 
              cssclass : 'inline-edit',
              //data   : data,
              id   : 'elementid',
              name : 'elementvalue',
              indicator : '&lt;img src="/assets/images/ajax-loader.gif"&gt;',
              tooltip   : 'Click to edit...',
              submit: 'Save',
              event: "click",
              //onblur : 'ignore',
              type: type
  
       });
  
       }   
  $('a.edit').live('click', function(){
          editProfileText("profile/editprofile", "span.detail" , "text", "");
           $('span.detail').trigger('click');
  });
  </code></pre>