JQuery Mobile - cannot hide button using generic jquery methods

I have this very simple button that I would like to hide

<input type="button" id="logoutBtn" value="logout" data-theme="d" data-inline="true" aria-disabled="false"> 

I use this simple call to try to hide it, but does nothing

 $('#logoutBtn').hide(); 

So, I tried to add this, and that will not work either.

 $('#first').live('pageinit', function(e){ $('#logoutBtn').hide(); }); 

What am I doing wrong?

+4
source share
1 answer

Possible duplicate jquery mobile cannot hide submit button

 <div data-theme="e" class="ui-btn ui-btn-inline ui-btn-corner-all ui-shadow ui-btn-hover-e ui-btn-down-e" aria-disabled="false"> <span class="ui-btn-inner ui-btn-corner-all"> <span class="ui-btn-text">Submit</span> </span> <input type="submit" id="logoutBtn" value="button" data-theme="e" data-inline="true" class="ui-btn-hidden" aria-disabled="false"> </div> $('#logoutBtn').closest('.ui-btn').hide(); 
+5
source

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


All Articles