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

Realtime enable and disable #31

Open
timemrah opened this issue Nov 19, 2016 · 3 comments
Open

Realtime enable and disable #31

timemrah opened this issue Nov 19, 2016 · 3 comments

Comments

@timemrah
Copy link

timemrah commented Nov 19, 2016

Is it possible to enable or disable this plugin at any time with JavaScript?

$(document).ready(function(){

    $('#item-id').theiaStickySidebar();

    if ('any time') {
        $('#item-id').theiaStickySidebar(false); //is this posible?
    }
    if ('any more time') {
        $('#item-id').theiaStickySidebar(true); //is this posible?
    }
});
@timemrah timemrah changed the title Realtime enable and diable Realtime enable and disable Nov 19, 2016
@liviucmg
Copy link
Member

Not at this moment, no. Also, how would disabling it work? Would it simply snap the sidebar back to its original position? Or would it keep its current position, but stop from changing it any further?

@timemrah
Copy link
Author

The columns of our website can change dynamically. Because the content changes dynamically. For example, the columns of our site fall from two to three.

We are activating the plug-in for all of our columns. We get very good results. But when we drop the column count dynamically from three to two, the columns are climbing over.

<!-- COLUMN PATTERN-1 -->
<div class="row">
    <div class="col-md-6">
        <!-- AREA-1 -->
    </div>
    <div class="col-md-6">
        <div class="col-md-6">
            <!-- AREA-2 -->
        </div>
        <div class="col-md-6">
            <!-- AREA-3 -->
        </div>
    </div>
</div>

<!-- COLUMN PATTERN-2 -->
<div class="row">
    <div class="col-md-6">
        <!-- AREA-1 -->
    </div>
    <div class="col-md-6">
        <div class="col-md-12">
            <!-- AREA-2 -->
        </div>
        <div class="col-md-12">
            <!-- AREA-3 -->
        </div>
    </div>
</div>

@liviucmg
Copy link
Member

This is now possible with version 1.7.0: #41 (comment)

Question is: should this destroy functionality be bundled inside the library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants