cordova - 2 div elements form an empty white space -


after adding code, application appears below white space

for (var i=0; i<len; i++) {  kk=i+1; audio[i] = false;   $('body').append('<div data-role="page" id="a'+i+'" data-theme="b" data-add-back-btn="true"> <div data-role="header" ><h1>'+results.rows.item(i).name+'</h1></div></div>'); $('#a'+i).append('<div data-role="content" > <img src="images/small/'+results.rows.item(i).img+'" class = "center" id="img"/> <p>Время - '+results.rows.item(i).time+'</p> <p>Телефон - '+results.rows.item(i).phone+'</p> <p>Рабочее время - '+results.rows.item(i).worktime+'</p>'); $('#a'+i).append('<p id="description">'+results.rows.item(i).shortdescription+'</p> <audio ontimeupdate="if (this.duration == this.currenttime) {this.currenttime = 0; this.pause()}; var activepage = $(\'.ui-page-active\').attr(\'id\');  if (activepage != \'a'+i+'\') {document.getelementbyid(\'audio'+i+'\').pause();} " id = "audio'+i+'" src="file:///sdcard/download/tur/'+results.rows.item(i).link+'"></audio>'); $('#a'+i).append('<div id = "virtbutton" onclick="window.plugins.fileopener.open(\'file:///sdcard/download/tur/'+results.rows.item(i).flash+'\'); document.getelementbyid(\'audio'+i+'\').play() "style = " background-image: url(\'images/virt.png\');background-repeat: no-repeat;width: 333px; height: 128px; position: absolute; margin-top:22px; display: block; float: left; " ></div>'); $('#a'+i).append('<div style = " background-image: url(\'images/song.png\');background-repeat: no-repeat;width: 128px; height: 128px; position: absolute; margin: 18px 0 0 212px; display: block; float: left;"  onclick = "if (!audio'+[i]+') {document.getelementbyid(\'audio'+i+'\').play(); audio'+[i]+'= true;} else {document.getelementbyid(\'audio'+i+'\').pause(); audio'+[i]+'= false;}"></div>'); $('#a'+i).append('<div style = "clear: both"></div><button onclick = "alert("lol"); db.transaction(function(tx) {tx.executesql(\'insert routes (id_object) values('+i+')\')});">Добавить в БД</button></div>');  

and in every window, different amount of space. how rid of it?

you can remove white space adding 'float: left' [style] property both of divs.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -