I'm trying to have a responsive sliding pane so that when the windows shrinks below tot pixels all the panes close and their behaviour is to auto-close themselves like setting ClickToOpen="false" in the markup.
When the window is bigger instead, I want them to stay open always, exactly what happens having ClickToOpen="true" in the markup.
So I thought this was a simple matter. With JS/Jquery I dedect windows resize (and orientation change for mobiles) and when windows goes below tot pixels I set set_clickToOpen(false), when the window size gets bigger I set set_clickToOpen(true).
I check with an alert(myslidingzoneID.get_clickToOpen()) and everything is set correctly on window resizes but for some reason the auto-close behaviour won't change, it always remains the same I set in the markup (default false if I don't set it in the markup).
How can make this to work? I'm opening the panes clicking on external buttons and calling code like (it's a prototype):
And it work perfect so I don't use the set_clickToOpen() method to change the opening behaviour but I need it to change the CLOSING behaviour (from auto close to manual close and vice versa).
Also a related question is... can I change the autoclose timing to make it faster when you mouseover from the opened pane?
And is it possible (in addittion to the standard autoclose with its default time) to close the pane clicking out of it? I know this is possible with a simple function like:
But this will collapse the pane even if I click INSIDE it, so how could I check it the click was made outside the pane to anticipate the autoclose feature?
Hoping in your always enlightning support.
Best regards
When the window is bigger instead, I want them to stay open always, exactly what happens having ClickToOpen="true" in the markup.
So I thought this was a simple matter. With JS/Jquery I dedect windows resize (and orientation change for mobiles) and when windows goes below tot pixels I set set_clickToOpen(false), when the window size gets bigger I set set_clickToOpen(true).
I check with an alert(myslidingzoneID.get_clickToOpen()) and everything is set correctly on window resizes but for some reason the auto-close behaviour won't change, it always remains the same I set in the markup (default false if I don't set it in the markup).
How can make this to work? I'm opening the panes clicking on external buttons and calling code like (it's a prototype):
function ButtonClick(x) {
var sz = $find("RadSlidingZoneMainAdminMenu");
alert(sz.get_clickToOpen(false));
if (x == '1') {
OpenPane('AdminMenuGeneral');
}
if (x == '2') {
OpenPane('AdminMenuComponents');
}
}
function OpenPane(x) {
//ExpandSlider();
var sz = $find("<%= RadSlidingZoneMainAdminMenu.ClientID%>");
sz.ExpandPane(x);
}
And it work perfect so I don't use the set_clickToOpen() method to change the opening behaviour but I need it to change the CLOSING behaviour (from auto close to manual close and vice versa).
Also a related question is... can I change the autoclose timing to make it faster when you mouseover from the opened pane?
And is it possible (in addittion to the standard autoclose with its default time) to close the pane clicking out of it? I know this is possible with a simple function like:
$('body').bind('click', function (event) {
' check open pane and collapse it
});
But this will collapse the pane even if I click INSIDE it, so how could I check it the click was made outside the pane to anticipate the autoclose feature?
Hoping in your always enlightning support.
Best regards