Webeshoppin
log
- workin on webeshppin.js#joinexist line 91? what to do based on exists.
- var cookieList = function(cookieName) {} has been changed only in lists.js
[jqm]
The docs say
$.mobile.listview.prototype.options.filterCallback during mobileinit or after the widget has been created with $("#mylist").listview('option', 'filterCallback', yourFilterFunction). Any function defined for the callback will be provided two arguments. First, the text of the current list item and second, the value being searched for. A truthy value will result in a hidden list item. The default callback which filters entries without the searchValue as a substring is described below:
function( text, searchValue ){
return text.toLowerCase().indexOf( searchValue ) === -1;
}; To filter list
[jqm] How do you add an element programmatically with all the css?
Add all the classes to it that you see in developer tools elements. See http://10.0.1.18/webeshoppin/stuff2get/zmisc/add2form.html
Query's closest(selector) function
will traverse upward and return the nearest selector provided. http://api.jquery.com/closest/
$("a.removerow").click(function(e){
$(this).closest('tr').hide();
e.preventDefault();
});
to force a move with refresh
method1
location.href= 'food2buy.html?repo=' + rep + '&list=' + lis;
method2 (data-ajax="false")
$('#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
click
http://10.0.1.18/webeshoppin/stuff2get/zmisc/buttonnotfiring2.html
this works
- BTW shoudn't use id for multiple items
<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('<li><a href="index.html" data-role="button" id="delalist">List: ' + alist + '</a></li>');
});
$('#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>
this doesn't
<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('<li><a href="index.html" data-role="button" id="delalist">List: ' + alist + '</a></li>');
});
$('#allyourlists').listview('refresh');
});
//gets the val of val1 from the previois call
$("#delalist").click(function (e) {
e.stopImmediatePropagation();
e.preventDefault();
alert ('in delalist') ;
});
</script>