rosebloomca / jquery-content-panel-switcher

Automatically exported from code.google.com/p/jquery-content-panel-switcher
0 stars 0 forks source link

Is it possible to put the menu inside the content panel? #8

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
hi I was wondering if you can help. I have two issues. 

1 Is it possible to put the menu inside the content panel and still work? I've 
tried and I cant get it to work.

2 I am using a scrollng plugin its called TopLink. It works on all areas on the 
site but not from any links inside the content switcher area i.e the jquery 
scroll wont work.

If you had any thoughts on this I would really appreciate it.

Thanks for a great plugin!

Original issue reported on code.google.com by hyland.c...@gmail.com on 1 Jun 2012 at 3:47

GoogleCodeExporter commented 8 years ago
Put a menu inside each content pane itself. 

To make this fully work change the .click function in the source code to 
.live('click', function) calls. This is because you'll be appending the menu 
and things that do the clicking, so when you do that, they'll lose their event 
bindings. You have to keep them there by using jQuery's live binding. Quite the 
trick!

Original comment by marcusgl...@gmail.com on 20 Jul 2012 at 5:31

GoogleCodeExporter commented 8 years ago
Thanks for the awesome plugin.

After reading the thread I've been playing around with the plugin, and have 
replaced:

jQuery('.switcher' + panel).click(function() {

with:

jQuery('.switcher' + panel).live('click', function() {

to make the 'panels within panels' navigation work.

But the .live call will die after jQuery 1.9, so I tried playing around with 
the .on() function. But no luck. Any ideas how this call needs to be 
constructed?

Cheers.

Original comment by br...@ingeni.net on 5 Feb 2013 at 5:19

GoogleCodeExporter commented 8 years ago
I've cracked it. 

Use this.

('#switcher-panel').on('click', ".switcher" + panel, function()

Original comment by dominic....@googlemail.com on 18 Sep 2014 at 4:59