When the Javascript you show is executed, the markup doesn't yet exist in the document. You can't bind to an element that doesn't exist.
You need to wrap your code in a
pageinit callback. Give your page a class.
- $(document).on("pageinit", ".some-page", function () {
- var $page = $(this);
- // your keyup and click registrations here
- $page.find("#text-ricerca").keyup...
- });
I recommend you use classes instead of IDs, though. Using IDs is the biggest mistake you could make in a jQuery Mobile project.