javascript - Jquery mobile 1.4.5 set panel height possible? -


i making jqm project mobile only.

i have 2 panels 1 set push other overlay. 1 in left corner , other top right corner.

my question possible set right panel 100% width (which i've done) , set height 10-20% (40px-50px).

can done without breaking functionality? can done in css? i'm able set width unable set height.

thanks in advance!!

customizing right or left panel need change 3 css classes set jqm. animation, panel, , inner part of panel content in. easier way create custom overlay box.

demo https://jsfiddle.net/bz649m86/

html

<div class="box"><a class="close">close</a></div> 

css

.box {     position:fixed; // fixed position used box     top:0; // placed @ top of screen     right:-100%; // minus position setting on right side of screen hidden view     background-color: blue;     width: 100%; //with width of whole screen, can width     display: block; //displayed in block format     z-index: 999999; // above header when in view     overflow: hidden; // if don't require scrolling within box     height:40px; // height size required //the transition settings not needed makes animation of panel smoother.     -webkit-transition: .3s ease;      -moz-transition: .3s ease;     -ms-transition: .3s ease;     -o-transition: .3s ease;     transition: .3s ease; } 

jquery

// animate on click bring box in view     $(document).on("click", ".pannel", function () {         $('.box').animate({             'right': "0%"         }, 300);     }) // , out of view when closed         $(document).on("click", ".close", function () {         $('.box').animate({             'right': "-100%"         }, 300);     }) 

as side note, method can have custom panel (overlayed) displayed anywhere on screen.

in demo box comes top of screen

https://jsfiddle.net/lqxp2ewb/


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -