Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable the events-content and append the content to a separate div #20

Closed
Wisecrackmac opened this issue Sep 20, 2021 · 6 comments
Closed

Comments

@Wisecrackmac
Copy link

Is your feature request related to a problem? Please describe.
I'm using eventListeners on the timelines date links to update DOM content from a javascript array, so don't need the selectedContent box.

Describe the solution you'd like
A parameter could be added like 'showContent' that can be set to false.

Describe alternatives you've considered
I've been trying to comb through the js and remove the content section, but I'm quite new to javascript so have been having some difficulty. Is this possible to do? Any help would be greatly appreciated.

Additional context
Add any other context or screenshots about the feature request here.

@yCodeTech
Copy link
Owner

Hi. Could you please send me your code, so that I can better understand what you are trying to achieve. Thanks.

@yCodeTech
Copy link
Owner

@Wisecrackmac If I understand correctly, you are using listeners on the timeline dates and then updating a content box that is completely separate from the plugin. Therefore are only utilising the timeline itself and you have no need for the timeline's content?

If that is the correct understanding, then it would be possible to do. Although can't you just hide the events-content in your CSS? Like...

.events-content {
   display: none;
}

Because the events-content is needed for the setup and operation of the timeline, we can't just remove it, all I would do is add the display: none; into the plugin.

Please let me know your thoughts.

@Wisecrackmac
Copy link
Author

Hey, sorry I think I phrased it poorly in the last post, and I did manage to get it working in the end. I think what I was trying to say was it’d be handy if there was a feature that let you append the events-content to another div on the page separate from the timeline itself, if that makes sense?

@yCodeTech
Copy link
Owner

@Wisecrackmac Ok, so once the timeline is setup with the events-content, we hide the events-content, and then append the events-content to another div. If this is correct, then I could add an option to specify a selector of where to put the events-content?? Something like:

contentContainerSelector: ".container" [selector string] | $('.container') [jquery object]

@Wisecrackmac
Copy link
Author

Yeah exactly! That’d be really useful I think

@yCodeTech yCodeTech added this to To do in Tasks via automation Sep 24, 2021
@yCodeTech yCodeTech changed the title Disabling selected content visibility Disable the events-content and append the content to a separate div Sep 24, 2021
yCodeTech added a commit that referenced this issue Sep 27, 2021
In a feature request, issue #20, it was proposed to add an option to specify a container element externally and separate from the plugin in order to append the events-content HTML and hide the plugin's default events-content. This comes in the form of `contentContainerSelector`. It accepts a selector string, such as '.container', '.home .container', etc. and it's default value is a boolean false. [Lines: 128, 1048-1067]
@yCodeTech
Copy link
Owner

I have released a new minor version of 2.0.5.4 with this new option. You can access the code here https://github.com/yCodeTech/horizontal-timeline-2.0/tree/v2.0.5.4

contentContainerSelector is false by default, and you use it by setting it to a selector string like ".container".

I am in the process of updating to version 2.0.6 which will remove all listed deprecated options. So keep your eyes peeled for that.

Thanks again for your continued usage of Horizontal Timeline 2.0 and for submitting a feature request, do make sure to submit any other feature requests in the future!

@yCodeTech yCodeTech moved this from To do to Done in Tasks Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Tasks
  
Done
Development

No branches or pull requests

2 participants