Variable selector not working
I cannot seem to get this variable selector to work.. grr
- $('button').click(function(){
- editCells();
- });
- var d=0;
- function editCells() {
- d++;
- inputType ='<span id="inDate'+d+'">To be replaced</span><input type="hidden" id="inDatepicker'+d+'" />';
- createDatpicker(d);
- $("#dialogue").append(inputType);
- }
- function createDatpicker(n) {
- $("#inDate"+n).text('date');
- console.log("#inDate"+n);
- }
http://jsfiddle.net/bcraig/jb755/1/