Help! Problem with dialog load function
Hi there and thanks for your time. I am using dialog() in the UI core functions to load another page into a modal style dialog window.
I'm sort of a javascript/jquery newb with some minor background in OOP from college, mostly a designer, so I don't understand some of basics and am diligently trying to understand the DOM as well.
I'm able to launch an inline div content with the modal dialog, themed just fine. However, when I attempt to load an external page in the same folder, the modal dialog doesn't "see" the theme. I've tried this with both scoped and unscoped themes for jquery.
Here's the code i'm using:
- <script type="text/javascript">
- $(document).ready(function() {
- $('a.clickview').each(function() {
- var $link = $(this);
- var $dialog = $('<div></div>')
- .load($link.attr('href') + '#content')
- .dialog({
- autoOpen: false,
- modal: true,
- title: $link.attr('title'),
- width: 800
- });
-
- $link.click(function() {
- $dialog.dialog('open');
- return false;
- });
- });
- });
- </script>
Obviously where "clickview" is the CSS class of the link I want to launch the modal dialog from, and "#content" is the ID wrapping my content in the external page.
Any assistance is appreciated. This is a great set of tools, I'm just scratching the surface.