WordPress.org

Ready to get started?Download WordPress

Forums

Collapse-O-Matic
[resolved] Findme/scrollonclose in internal collapse trigger? (16 posts)

  1. Darwyn43
    Member
    Posted 1 year ago #

    Hey,

    Is there any way to do a findme/scrollonclose that is triggered on an internal collapse trigger? I have a content-heavy site (basically collapsible articles) and want to have the collapse trigger return the reader to the origin.

    Thanks!

    http://wordpress.org/extend/plugins/jquery-collapse-o-matic/

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    A Link would help greatly.

  3. Darwyn43
    Member
    Posted 1 year ago #

    Hey Baden,

    Could you be more specific? This sounds an awful lot like I'm missing something obvious, but I looked in the supporting documentation and couldn't find anything on "A Link" (or maybe its just a "link?") What am I missing?

    Just in case, here's a page that uses a lot of collapse-o-matic: http://www.morgankinney.com/epics/chemical-information-and-the-inner-world/dopamine-goals-dreams-2/dopamine-101/

    Best,
    Morgan

  4. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, a link to an example page that helps us understand what you are trying to accomplish. The link above was very helpful, thank you.

    OK. So you want to have the Internal Collapse Trigger be able to scroll the page back to the trigger text. Let us play with this a bit and come up with a solution for you.

    Thanks for the feedback, please stand by.

  5. Darwyn43
    Member
    Posted 1 year ago #

    Haha It was more obvious than I thought!

    No worries, standing by :)

  6. Darwyn43
    Member
    Posted 1 year ago #

    Hey Baden,

    I thought I'd add an unrelated issue in case you know something about it.

    Since the WP upgrade to 3.5, I've been experiencing issues with my content editor (I'm using Ultimate TinyMCE) removing my collapse-o-matic colomat-close code.

    It seems to happen somehow by transitioning between visual and text editor, as the problem appears in the text editor when the code (<span id...class...>Collapse</span>[/expand]) gets replaced with the way that code looks in the visual editor (Collapse[/expand).

    I'm honestly not sure if this is a Ultimate TinyMCE problem or a collapse-o-matic problem, so I've posted both in Josh Lobe's forum and thought I'd mention it here as well. Any thoughts?

    Thanks (Sorry?) for working double duty :)
    Morgan

  7. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Morgan,

    Regarding the Visual Editor... it's always best to use the HTML view when working with shortcodes... never sure how the Visual editor mangle things.

    As for the Internal Scroll-To-Trigger, Here is a bit of good news!
    Please download and install version 1.5d from The Plugin Oven: http://plugins.twinpictures.de/plugins/collapse-o-matic/

    As you can see in this demo version 1.5d adds the ability to assign the scroll-to-trigger class to Internal Collapse Triggers. This will automatically scroll the page to the Main Trigger Text.

    Please let us know if this works for you... we hope to release 1.5 next week.

    -Twinpictures

  8. Darwyn43
    Member
    Posted 1 year ago #

    Baden, you rock! Thanks man, this is EXACTLY what I need.

    I'm aware of the shortcode problem with the visual editor but I didn't realize that you could actually lose the shortcode by switching between the visual editor and text/html editor. I thought you lost the shortcode code when you updated FROM the visual editor, and I thought I was taking precautions to enter content in the visual editor and then switch to the html editor to update (I enter a LOT of content and the text editor gets old/cluttered for that). But you think the transitioning between them can cause it? Basically I just shouldn't use the visual editor?

    Anyway, thanks a lot - creating the code for me goes above and beyond. You're the best!

    Morgan

  9. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Glad everything worked out!

  10. koganas
    Member
    Posted 1 year ago #

    Hi Baden, i´m trying to figure it out almost the same thing, but i'm using the roll-your-own type with the trigger below the target.
    Here´s the code

    <div id="target-ID" class="collapseomatic_content">
     <?php the_content(); ?>
    </div>
    
    <span class="collapseomatic scroll-to-trigger" title="continue lendo" id="ID">keep reading</span>
    <span id="swap-ID" style="display: none;">&nbsp;</span>

    the link that i am testing (when the thumbnails and text starts)
    http://site1369326559.provisorio.ws/thinking/

    Thanks in advance!

  11. koganas
    Member
    Posted 1 year ago #

    "scrollonclose" attribute could be a good resolution but it only works with shortcodes. I didn´t found the hardcode on the documentation.

  12. koganas
    Member
    Posted 1 year ago #

    hello, anybody knows why the scroll-to-trigger isn't working at my theme?

  13. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    The proper structure is like so:

    <span class="collapseomatic " id="your_ID" title="read more" >read more</span>
    <div id="target-your_ID" class="collapseomatic_content">Your content goes here
    <span class="collapseomatic colomat-close scroll-to-trigger" id="bot-your_ID">click here to close</span>
    </div>
  14. koganas
    Member
    Posted 1 year ago #

    tks, but this is not exactly what i want, i read the documentation about that. What i am trying is the same as it works at the link http://site1369326559.provisorio.ws/thinking/, just swapping the span and always at the bottom of post.

  15. koganas
    Member
    Posted 1 year ago #

    this is how i tried

    <div id="target-mais<?php the_ID(); ?>" class="collapseomatic_content" style="position:relative;">
    <?php the_content(); ?>
    </div>
    
    <a class="collapseomatic" title="read more" id="mais<?php the_ID(); ?>" ><span class="morec dow">read more <div class="dowh"></div></span></a>
    
    <a id="swap-mais<?php the_ID(); ?>" style="display: none;"><span id="bot-<?php the_ID(); ?>" class="collapseomatic colomat-close scroll-to-trigger morec clos"><div class="closh"></div></span></a>

    please ignore the dirt code, i'm just testing the roll-your-own structure.

  16. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    As you can see in the example we provided, the bot- trigger needs to be placed INSIDE of the target content. So to fix your example:

    <div id="target-mais<?php the_ID(); ?>" class="collapseomatic_content" style="position:relative;">
    <?php the_content(); ?>
    <span id="bot-<?php the_ID(); ?>" class="collapseomatic colomat-close scroll-to-trigger morec clos"><div class="closh"></div></span>
    </div>
    
    <span class="collapseomatic morec dow" title="read more" id="mais<?php the_ID(); ?>" >read more <div class="dowh"></div></span>
    <span id="swap-mais<?php the_ID(); ?>" style="display: none;"></span>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic