unique numbers for jquery - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: unique numbers for jquery (/showthread.php?tid=66990) |
unique numbers for jquery - wolfgang1983 - 12-29-2016 I am creating a hyperlink insert for my codeigniter form that I have My script creates links like where has a unique number for each link PHP Code: [example][1] My Question is if there like below where number 1 & 3 show if I create a new hyper link it should be able to set the next available number which is 2 and so on. Live demo PHP Code: [example][1] Code: $('#myLink').on('shown.bs.modal', function() { RE: unique numbers for jquery - andersonunsonst - 12-29-2016 you don't need javascript for this, simply make an auto-increment field, or use https://api.jquery.com/jQuery.uniqueSort/ |