mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-04 23:00:23 +00:00
Cleanup, added some notes; blur search input on submit
This commit is contained in:
parent
9d7270141d
commit
bfcc597618
1 changed files with 4 additions and 2 deletions
|
|
@ -13,9 +13,11 @@
|
|||
{
|
||||
id: "dollar-to-euro",
|
||||
label: "$ => €",
|
||||
// TODO lookup localStorage API, maybe use storageJS
|
||||
//rate: localStorage["dollar-to-euro-rate"] || 0.766694779,
|
||||
rate: 0.766694779,
|
||||
update: function(callback) {
|
||||
return;
|
||||
var self = this;
|
||||
var url = "http://query.yahooapis.com/v1/public/yql?q=select%20rate%2Cname%20from%20csv%20where%20url%3D'http%3A%2F%2Fdownload.finance.yahoo.com%2Fd%2Fquotes%3Fs%3DUSDEUR%253DX%26f%3Dl1n'%20and%20columns%3D'rate%2Cname'&format=json&diagnostics=true&callback=?";
|
||||
$.getJSON(url, function(result) {
|
||||
|
|
@ -38,7 +40,6 @@
|
|||
];
|
||||
$.each(conversions, function(index, conversion) {
|
||||
conversion.update && conversion.update();
|
||||
// need to theme these; styles get applied only to existing elements at pageload time
|
||||
$("#conversion-field").tmpl(conversion).appendTo("#conversions");
|
||||
});
|
||||
$.mobilize($("#conversions"));
|
||||
|
|
@ -49,8 +50,9 @@
|
|||
});
|
||||
}).keyup().focus();
|
||||
$("form").submit(function() {
|
||||
$("#term").blur();
|
||||
return false;
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Reference in a new issue