简体   繁体   中英

How to remove the already opened popup in jquery mobile

I googled and search SO but can't find anything relates to me.

http://jsfiddle.net/aravinth/Ad22d/90/

In this fiddle, cloned the table rows using ADD ROW in that table row click Add Expenses shows the popup it is also cloned when click the PLUS icon ...

My problem starts here now i click the first row add expense button , 3 rows cloned in popup then click the second row add expenses it shows three rows but i need to show only one column (that is default one)...

Please suggest some idea...Thank You

I have added following method on addExpenses buttons (ie Add onclick="addExpenses();" attribute to all addExpenses buttons.)

function addExpenses()
{
  var row = document.getElementById("expenseTable");
  var table = document.getElementById("expenseParticulars");
  var rowcount=table.rows.length-1;
  for(var i=2;i<=rowcount;)
  {
    table.deleteRow(i);
    rowcount--;
  }
  var clone = row.rows[1];
  var addExpenses = clone.cells[3].getElementsByTagName('input')[0];
  addExpenses.disabled = false;
  counter=2;
}

Please refer this jsfiddle.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM