Hi Kelvin, I added some custom options to the defaults so make it easier to avoid conflicts with other scripts. Check the defaults at the bottom of the script to see what I'm talking about. I ran into a conflict with a gallery script on the same page, both were binding to html for click events. Changing the parent element to body or whatever you want to restrict the movement to solved my issue. Thanks for a great script.
added customization options, check defaults at bottom of script
Thanks for the patch. However, I don't understand what the conflict can be with two scripts binding to the same element. How does the conflict manifest itself? I'm using namespaced events so should never effect events added by another script...
What is the point of the repositionPane stuff? You don't mention that in the message above.
I'll add some more comments inline in the commit...
Why not just set it to 'html' in the default settings object below (where you currently set it to false)? Then you wouldn't need to repeatedly do this check...
Is this from when you were trying to debug the interaction with the other script?
Please don't change defaults not directly related to your patch. Thousands of people use the plugin and a change in default behaviour will confuse all of them who upgrade...
As mentioned above, if this was:
Then you could avoid loads of checks above...
You are correct on the setting defaults, I will make the change. I guess I kept my unrefined exploration code in place.
I'm not entirely sure why there were conflicts, but after a brief search through google groups I found that others had conflicts with the unbinding of mouse click events using older versions of jQuery. I ran into the same problem when trying to use scroll bars in combination with a photo gallery plugin. I don't know the exact reason for the problem, but I know the solution that works effectively is my parentElement change. This has potential outside of a bug fix as well.
repositionPane gives the option for strict css placement, positioning of the pane manually if false or allow the script to move the pane when the scroll bars are present if set to true. I have a need to make sure the pane stays in one place regardless of scroll bars. My content needs to line up correctly. So, the repositionPane option, if set to false, will just show the scroll bars, leaving the positioning up to the coder via css.
adjusted for notes