GiGamma GiGamma - 1 year ago 167
jQuery Question

Jasny Bootstrap - offcanvas avoid push of the main page: how to force menu to overlap?

I'm using the offcanvas.js by Jasny Bootstrap on Prestashop.

My offcanvas menu, once a button is clicked, pushes the main page on the left and enters in slide from the left.

I would like to achieve this:

once the button is clicked the main page SHOULD NOT MOVE, the
offcanvas should slide from left (as it is now) BUT, instead of pushing it, overlap the main page...

Which part of the offcanvas.js should I change?

Answer Source

I commented the line 155:

//$('body').css(prop, padding)

And line 187:

//$(this).css(placement, 0)

and replaced all canvas-sliding with the class no-sliding...

it worked by attempt!