adchsm / Slidebars

Slidebars is a jQuery Framework for Off-Canvas Menus and Sidebars into your website or web app.
http://www.adchsm.com/slidebars/
MIT License
1.5k stars 307 forks source link

Click on links in Slidebar has no effect #163

Closed actcontpr closed 9 years ago

actcontpr commented 9 years ago

Hoi. I've got a problem with slidebar. It initializes and toggles just as I set it up, however, when I click on a link inside the slidebar, it just closes - just as expected with toggle activated - but does not call the link I clicked on. It appears that somehow Slidebar is capturing the click on the link - although hover reaction does work inside the navigation - the cursor changes over links as configged in the navigation css.

What't wrong here?

Thanks for any help. And thanks for Slidebar - looks good and the featureset is really neat.

adchsm commented 9 years ago

Hi there,

Do you have a demo url I can see? It might help me to figure out whats going wrong.

Thanks, Adam

actcontpr commented 9 years ago

Thanks for the reply. I set up a testdeployment here. ... It's initializr stuff with some content. Maybe I've overlooked something somewhere? push mode completely breaks btw. ... I can set up a demo for that aswell if you like.

adchsm commented 9 years ago

Hi there,

I took at look at your site, there are a few simple errors to fix!

First your Slidebars are located inside of your sb-site container, they need to be outside of this.

Any click on the site container will close the Slidebar. As your Slidebars are located within the container, the click will close it.

See the basic template example on the usage page.

You also have the class sb-toggle-left applied to the Slidebar. So any click on it will also close it, try removing that too.

screen shot 2015-01-06 at 22 57 08

This should also fix the push issues your having too.

Let me know if that helps,

Thanks, Adam

actcontpr commented 9 years ago

Thanks for the hints. I'm still having trouble with the push option though. I removed the toggle as you said and built my own, but the push effect still is causing trouble When I click on the Hamburger butten, the top bar is pushed down by some mystical invisible force. ... :-) ... Couldn't find any hidden element or css with Chrome DevTools - any ideas?

adchsm commented 9 years ago

Hey there,

I see the problem with your navbar now. Try this: http://plugins.adchsm.me/slidebars/issues/fixed-position.php.

The margin is coming from the billboard, but that's not the problem.

screen shot 2015-01-08 at 13 42 37

Whats happen is that elements with a fixed position that have a translated parent behave like absolute, apparently this is by design and not a bug with the spec.

You can get around this by translating the fixed element separately by adding the class sb-slide, and moving the element outside of the sb-site container.

You don't have to create your own button, you just didn't need the toggle on the Slidebar.

I hope that helps!

Adam

actcontpr commented 9 years ago

Thanks for the hints. I fiddled around a bit and solved the problem like this. ... That sb-slide class is a pratical thing.

For anybody having similar problems, here's how I tackled it: screencap

Thanks for the help. I'll keep on fiddling. Slidebar currently is my primary choice for nav - I'll see how it holds up further down the road with mobile, reponsive webdesign and all that.

adchsm commented 9 years ago

Great, glad you got it sorted!