How to make Drop down panel in jQuery mobile 1.4.0?

前端 未结 1 492
庸人自扰
庸人自扰 2020-12-11 13:35

I have the following Panel in my jQuery mobile app , I want to make it to be drop down as appears in the following image rather than to be slide from the page edge . Is thi

1条回答
  •  死守一世寂寞
    2020-12-11 14:11

    You can use popup widget to simulate dropdown menu.

    As of jQuery Mobile 1.4, a new attribute data-arrow is added to popup widget. This creates an arrow which can be positioned anywhere in popup.

    Arrow:

    The popup can display an arrow along one of its edges when it opens if the data-arrow attribute is set. The attribute can take a value of true, false, or a string containing a comma-separated list of edge abbreviations ("l" for left, "t" for top, "r" for right, and "b" for bottom). For example, if you set data-arrow="r,b" then the arrow will only ever appear along the bottom or right edge of the popup. true is the same as "l,t,r,b" and false or "" indicates that the popup should be displayed without an arrow.

    HTML

    Add data-rel="popup" to button to call popup.

    Menu
    

    To modify arrow's size, check this link.

    Demo

    0 讨论(0)
提交回复
热议问题