title: How to make muliple fields editable generated from database?
body: <p>So i've got a database with about 100 records, these records get shown on a website where you are supposed to edit them.</p>
  
  <p>The generated result looks like this at the moment:</p>
  
  <pre><code>&lt;div class="col-md-4 col-sm-6 col-xs-12"&gt;&lt;a href="#" id="permission" data-type="text" data-pk="1" data-url="test.php" data-title="Enter permission"&gt;bukkit.command.help&lt;/a&gt;&lt;/div&gt;
  &lt;div class="col-md-4 col-sm-6 col-xs-12"&gt;&lt;a href="#" id="permission" data-type="text" data-pk="2" data-url="test.php" data-title="Enter permission"&gt;essentials.afk&lt;/a&gt;&lt;/div&gt;
  &lt;div class="col-md-4 col-sm-6 col-xs-12"&gt;&lt;a href="#" id="permission" data-type="text" data-pk="3" data-url="test.php" data-title="Enter permission"&gt;essentials.list&lt;/a&gt;&lt;/div&gt;
  &lt;div class="col-md-4 col-sm-6 col-xs-12"&gt;&lt;a href="#" id="permission" data-type="text" data-pk="4" data-url="test.php" data-title="Enter permission"&gt;essentials.sethome.bed&lt;/a&gt;&lt;/div&gt;
  &lt;div class="col-md-4 col-sm-6 col-xs-12"&gt;&lt;a href="#" id="permission" data-type="text" data-pk="5" data-url="test.php" data-title="Enter permission"&gt;essentials.tpaccept&lt;/a&gt;&lt;/div&gt;
  &lt;div class="col-md-4 col-sm-6 col-xs-12"&gt;&lt;a href="#" id="permission" data-type="text" data-pk="6" data-url="test.php" data-title="Enter permission"&gt;itemcase.buy&lt;/a&gt;&lt;/div&gt;
  </code></pre>
  
  <p>As you may or may not have guessed by now these are minecarft permissions (however irrelevent to this issue).</p>
  
  <p>To edit these i would like to use X-editable but since all have the same id they can't be edited (except for the first record).</p>
  
  <p>I could change the generation so that they each get a unique id just like the data-pk element.
  However this would cause trouble in the javascript file since i would have to add a new like of javascript for each element then.</p>
  
  <p>Current my javascript is like this:</p>
  
  <pre><code>$.fn.editable.defaults.mode = 'inline';
  $('#permission').editable();
  </code></pre>
  
  <p>But as mentioned before this will only work for the first result. I could staticly define each element to be editable, but thats not possible since the amount of data is unknow beforehand and dynamic.</p>
  
  <p>How can i go about making fields like these editable?</p>