Difference between revisions of "Webeshoppin"
From Wiki2
Line 25: | Line 25: | ||
var myCars=["Saab","Volvo","BMW"]; // literal array</pre> | var myCars=["Saab","Volvo","BMW"]; // literal array</pre> | ||
<script> | <script> | ||
//Why is delete button not firing? | //Why is delete button not firing? | ||
Line 39: | Line 38: | ||
//gets the val of val1 from the previois call | //gets the val of val1 from the previois call | ||
$('body').on('click', "#delalist", function (e) { | |||
e.stopImmediatePropagation(); | |||
e.preventDefault(); | |||
alert ('in delalist') ; | |||
}); | |||
</script> | </script> |
Revision as of 15:07, 30 January 2012
to force a move with refresh method1
location.href= 'food2buy.html?repo=' + rep + '&list=' + lis;
method2
$('#allyourlists').append('<li><a href="food2buy.html?repo=' + rep + '&list=' + lis + '" data-ajax="false" >Repo: ' + rep + '& List: ' + lis + '</a></li>');
Why doesn't the clich http://10.0.1.18/webeshoppin/stuff2get/zmisc/buttonnotfiring.html
javascript
var myCars=new Array(); // regular array (add an optional integer myCars[0]="Saab"; // argument to control array's size) myCars[1]="Volvo"; myCars[2]="BMW"; 2: var myCars=new Array("Saab","Volvo","BMW"); // condensed array 3: var myCars=["Saab","Volvo","BMW"]; // literal array
<script> //Why is delete button not firing? $('#thelists').bind('pageinit', function(event) { console.log('in bind pageinit for yourlists'); var thelists = ["list1", "list2"]; console.log(thelists); $.each(thelists, function(index, alist) {
$('#allyourlists').append('
'); }); $('#allyourlists').listview('refresh'); }); //gets the val of val1 from the previois call $('body').on('click', "#delalist", function (e) { e.stopImmediatePropagation(); e.preventDefault(); alert ('in delalist') ; }); </script>