Bar
These methods allow you to interact with the Bar (Public beta).
note
Please keep in mind that the CartPops API is subject to change. Before updating, please check the changelog to learn what has changed and whether you can safely upgrade.
show()
Open the Bar.
🛠 Method
CartPops.bar.show();
🌈 Example
jQuery( document).ready( function( $ ){
$( '#your-element' ).on( 'click' , function() {
CartPops.bar.show();
});
});
hide()
Hide the Bar.
🛠 Method
CartPops.bar.hide();
🌈 Example
jQuery( document).ready( function( $ ){
$( '#your-element' ).on( 'click' , function() {
CartPops.bar.hide();
});
});
toggle()
Toggle the Bar.
🛠 Method
CartPops.bar.toggle();
🌈 Example
jQuery( document).ready( function( $ ){
$( '#your-element' ).on( 'click' , function() {
CartPops.bar.toggle();
});
});