This is a migrated thread and some comments may be shown as answers.

Splitter collapse not triggered after upgrading jquery to 1.9.1

2 Answers 134 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Sarah
Top achievements
Rank 1
Sarah asked on 21 May 2013, 08:35 PM
We have recently upgraded our jQuery version, as well as downloaded the latest version of Kendo UI.
Since then, the following code, which worked previously, doesn't do anything:
var splitter = $("#horizontal").data("kendoSplitter");
if (expand && $("#center-pane").data("pane").collapsed) {
        //expand
        splitter.expand("#center-pane");
}
else {
        //collapse THIS ONE ISN'T WORKING
        splitter.collapse("#center-pane");
}
Either this is a known bug for everyone who recently upgraded jQuery, or, I suspect it is more likely because we are using a *customized* minified jQuery file, rather than the jquery.min.js included in the Kendo download. 

So, my question is: specifically, what dependencies of jQuery are required for the splitter tool. Also, are there any jquery.ui.js dependencies for the splitter? Aka, what jQuery libraries is the Splitter built upon? I couldn't find this type of documentation in the product specs. I would like to make sure our custom minified file includes all that is completely needed.

Thanks for your help!
Sarah

2 Answers, 1 is accepted

Sort by
0
Sarah
Top achievements
Rank 1
answered on 21 May 2013, 08:54 PM
I believe I have found the issue. Perhaps something changed with the latest Kendo?

Here was my previous instantiation logic:
$(function() {
 // initialize splitter
 $("#horizontal").kendoSplitter({
   panes: [
    { collapsible: false, resizable: false, size: "590px", min: "460px" },
    { collapsible: false, collapsed: true, resizable: false, size: "520px" },
    { collapsible: false, resizable: false, size: "32%" }
   ],
   resize: onSplitterResize,
   expand: onSplitterExpand
 });
} );
I want to keep the user from manually collapsing the Splitter herself, which is why I originally set it up this way (notice the center pane has collapsible: false). The use case is after a certain click action, an "extended options" pane is revealed to the user. I only want that pane expanded in the case she clicks the link to expand it.

Now, it seems I must set collapsible: true in order for the collapse event to trigger. Can you confirm this has changed?

Is there a work around for this? I'm hoping for some way I can continue to prohibit my user from collapsing yet still be able to manually collapse in the background via other js events.
0
Petur Subev
Telerik team
answered on 23 May 2013, 03:11 PM
Hello Sarah,

The logic for the collapsible behavior you described has not changed from Q3 2012. Anyway I am afraid that there is not work-around to this - this is the expected behavior if the pane is not collapsible you cannot programatically collapse it.

I am sorry for any inconvenience caused.

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Splitter
Asked by
Sarah
Top achievements
Rank 1
Answers by
Sarah
Top achievements
Rank 1
Petur Subev
Telerik team
Share this question
or