Is it too much to ask for an invisible button on jQuery Mobile?

I struggled with this for a while, so I decided that I would answer here.

How can I create an invisible button on jQM?

0
source share
2 answers

Create a button using this tag -

<input type="[yourchoice, mine was submit]" id="[yourchoice]" data-role="none" />

The most important part is data-role="none" . This means that jQM ignores it, so when you use $.hide() , you do not get a random empty rendering image on the screen.

+2
source

In my case, I can’t get the click on submit event by clicking the go button, if the input is hidden (if it is not hidden, it works). I get around this with css: "width: 1px; height: 1px; background: transparent; border: 0;". Maybe this also helps someone.

+1
source

Source: https://habr.com/ru/post/918848/


All Articles