very basic code which we use offten in our day to day development and sometime we stucked . i write those issue here with simple solution. You will get codes of html, css, javascript, jquery, json,ajax, node.js, vue.js, nuxt.js, php and Mysql
Thursday, April 4, 2013
data fetching while scrolling just like facebook
<script language="javascript" src="http://www.infoonnet.com/js/jquery.js"></script>
<script>
$(document).scroll(function(){
if ($(window).scrollTop() + $(window).height() == $(document).height())
{
document.getElementById("a").innerHTML+='<div style="height:100%; border:1px solid red" id="a">pag1 1</div>';
}
});
</script>
<div style="height:100%; border:1px solid red" id="a">
pag1 1
</div>
<div style="height:100%; border:1px solid red" id="b">
pag1 1
</div>
Tuesday, April 2, 2013
set row value in numeric order if your data position is unformate
old
new
alter table table_name drop id;
ALTER TABLE `table_nmae` ADD `id` INT(255) NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`id`)
you have to run both code at a same type
| inserted Id |
| 2 |
| 5 |
| 4 |
| 3 |
| inserted Id |
| 1 |
| 2 |
| 3 |
| 4 |
alter table table_name drop id;
ALTER TABLE `table_nmae` ADD `id` INT(255) NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`id`)
you have to run both code at a same type
Subscribe to:
Comments (Atom)