Help with Collapsible Panel, closePanel |
Post Reply |
Author | |
Maclellan
Newbie Joined: Aug 21 2017 Location: earth Status: Offline Points: 4 |
Post Options
Thanks(0)
Posted: Aug 21 2017 at 7:11am |
I have 12 buttons in a Collapsible Panel, a empty frame, and a javascript with a stylesheet and txt files.
What happens; by clicking on a button the script picks and sends text from a text.txt to the empty frame and fills is with formated text. The problem is, I can't figure how to close the collapsible panel after button is clicked. Any one know how to add this to my script, here is one of the button snips; <!-- $(document).ready(function() { $("#WEinform").click(function() { $("#WEtextarea").load("Files/Docs/waiting.txt"); if (isOpen) { closeNav(); } }); }); --> Thanks for reading..
|
|
What we envision, we make happen.
|
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
Hi,
If you already have code that works (partly), please post it here. Otherwise, to close the collapsible panel, imitate a click on its trigger part: $('#WE_id_of_your_collapsible_panel .PullZone').click(); |
|
Maclellan
Newbie Joined: Aug 21 2017 Location: earth Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Got it to work!
First, Thank You... second, here is a working button; <!-- $(document).ready(function() { $("#WEinform").click(function() { $("#WEtextarea").load("Files/Docs/waiting.txt"); $('#WEcollpanel .PullZone').click(); }); }); --> notes: #WEinform is the ID of the button. #WEtextarea is the ID of the the frame. #WEcollpanel is the ID of the Collapsible Panel. Whatever.txt is loaded in frame, use style to set size, font and placement of frame. Use one instance for each button, stack as many as needed and save as whatever.js in OE, open source code, add code block, give name, chose as 'other script', position header. type in; <script src="yourfolder/yourwhatever.js"></script> Leave out the <!-- --> Next will be to load an image in another frame on same button click.
|
|
What we envision, we make happen.
|
|
Dmit OE
Admin Group Joined: May 31 2012 Status: Offline Points: 5283 |
Post Options
Thanks(0)
|
$('#WEanother_frame').css('background-image', myImageURL);
or $('#WEimage_element img').attr('src', myImageURL); |
|
Maclellan
Newbie Joined: Aug 21 2017 Location: earth Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Here is what I've pull together... $(document).ready(function() { $("#WEyear18000").click(function() { $("#WEtextarea").load("Files/Docs/myText.txt"); $('#WEimage_view').html('<img src="Files/Image/myImage.jpg" />'); $('#WEee244f5837 .PullZone').click(); wheelzoom(document.querySelectorAll('img')); }); }); This feature has wheel mouse zoom effect that you can drag around with left mouse button. Here is where you get the wheel zoom.js script. http://www.jacklmoore.com/wheelzoom/
|
|
What we envision, we make happen.
|
|
Jay
Newbie Joined: Nov 02 2016 Status: Offline Points: 13 |
Post Options
Thanks(0)
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |