I'm trying to develop a program to automatically open the "east" region of EasyUI framework by clicking a button. My solution is to change the value of the "collapsed" attribute in the data-options attribute. Take below script for reference:
I've used various JQuery ways to do this, but all failed. Below are some of my testing results (with comments)
alert($("#east").attr("data-options")); //the value of data-options can be shown correctly, so it works.
$("#east").attr("data-options","region:'east',split:true,collapsed:true,title:'East1'");//this line does not work, it is unable to change any attribute values in the data-options attribute.
$("#east").panel({ title: "title123", //this can change the value of the title, so this line works. collapsed: false, //the status of "collapsed" remains unchanged, so it does not work. });
var panel = $("#mydiv").layout("panel","east"); panel.panel({title:"tital"}); //the status of title can be changed, so this line works. panel.panel({collapsed:true}); //this line does not work.
Could anyone help to change the status of the "collapsed" status, so that i can open the east region automatically? Thanks a lot.