Page 3 of 3

how to open and close both on one button click??

Posted: Wed Nov 12, 2014 5:06 am
by Yurii Orishchuk

I mean functionality you want does not supports by JQM pannel component and you need to block needed surface with absolute position div manually.

http://www.w3schools.com/css/css_posi...

Regards.


how to open and close both on one button click??

Posted: Wed Nov 12, 2014 2:51 pm
by Ellen Schlechter

So I try to paste this code in a run JS event but it comes up with a bunch of errors.
<!DOCTYPE html SYSTEM

h2 {
position: absolute;
left: 100px;
top: 150px;
}

This heading has an absolute position
With absolute positioning, an element can be placed anywhere on a page. The heading below is placed 100px from the left of the page and 150px from the top of the page.


how to open and close both on one button click??

Posted: Thu Nov 13, 2014 2:33 am
by Yurii Orishchuk

Hi Ellen,

Okay, it's better,

Here is code to show interface blocker:

pre

Code: Select all

 jQuery("&#46;hideElement")&#46;remove(); 

 &#47;&#47;You should use here your splash screen image&#46; 

var hideElement = jQuery('');

Code: Select all

 &#47;&#47;Hide current page with imitation of splash screen&#46; 
jQuery("body")&#46;append(hideElement); 

/pre

And here is code to hide it:

pre

Code: Select all

 jQuery("&#46;hideElement")&#46;remove(); 

/pre

Regards.


how to open and close both on one button click??

Posted: Thu Nov 13, 2014 2:36 am
by Yurii Orishchuk

Code with escaping:

precode

Code: Select all

 jQuery("&#46;hideElement")&#46;remove(); 

 &#47;&#47;You should use here your splash screen image&#46; 

var hideElement = jQuery('<div class="hideElement" style="position: absolute; left: 0; top: 0; bottom: 0; right: 0; background-color: #000; opacity: 0&#46;5; z-index: 99"><>');

Code: Select all

 &#47;&#47;Hide current page with imitation of splash screen&#46; 
jQuery("body")&#46;append(hideElement); 

/code/pre

Regards.


how to open and close both on one button click??

Posted: Thu Nov 13, 2014 4:18 am
by Ellen Schlechter

What does "code with escaping" mean? Also, what do you mean by using the splash screen image? Sorry to ask stupid questions!


how to open and close both on one button click??

Posted: Thu Nov 13, 2014 4:45 am
by Yurii Orishchuk

GS, ate some symbols.. And code been incorrect.

So second code is correct.

Forget comments with "splash screen" this code from other places..

Regards.


how to open and close both on one button click??

Posted: Thu Nov 13, 2014 4:54 am
by Ellen Schlechter

And I just add this to a panel open - run JS event, correct?


how to open and close both on one button click??

Posted: Thu Nov 13, 2014 4:59 am
by Ellen Schlechter

Ok so it worked but after the panel closed, it still remained slightly darkened so I could change the opacity to 0.0 and it would be fine, right?


how to open and close both on one button click??

Posted: Thu Nov 13, 2014 10:22 pm
by Yurii Orishchuk

Hi,

Nope, you just need to use code as suggested when need to close this blocker:

pre

jQuery("&#46;hideElement")&#46;remove();

/pre

Regards.


how to open and close both on one button click??

Posted: Tue Aug 04, 2015 8:17 am
by She

Hi Yuri,
How can i add attribute programmatically? becuase this code is not working see the code below:

code
Apperyio("MainMenuPanel" )&#46;panel("option", "dismissible", false );
/code