prevent jquery mobile from styling element

后端 未结 3 1277
Happy的楠姐
Happy的楠姐 2021-02-04 02:53

I\'ve got a checkbox that I want hidden on the page. My obvious first attempt was the following:


         


        
3条回答
  •  南方客
    南方客 (楼主)
    2021-02-04 03:35

    For future users.

    Just in case you want to disable for every form element or your forms are loading dynamically where you cannot edit markup use this.

            $(document).on('pagebeforecreate', function( e ) {
                $( "input, textarea, select", e.target ).attr( "data-role", "none" );
            });
    

提交回复
热议问题