JQuery Mobile - Position a input button next to an input text area

前端 未结 4 1660
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-12 07:58

I am trying to get a inputtext area and a submit button attached just to the right of it. Ideally, the two together will use 100% of the width and

4条回答
  •  不思量自难忘°
    2021-01-12 08:47

    After a fruitful discussion with adamdehaven, it turns out that:

    • A validate button is most of the time unnecessary and against the logic of mobile applications. It is better to use for such problems
    • The framework does not allow to customize the icon for type="search" content.

    To make for the latter, I put together an ugly hack that you can see there. Unless you zoom in quite a lot you won't see a difference with the regular type="search" besides the darker grey. However, I suspect this solution could be vulnerable to minor changes to the framework in the future.

    Another solution would be to directly pull out the icon and manually overimpose an home made icon button over the input. It should be slightly more robust (because at least the button would not be based on the framework) but requires a few quick photoshop changes to pull out the icon and put it in a propper file.

提交回复
热议问题