Content HTML

<-- START JSPANEL DIV -->
    <-- HEADER SECTION -->
    <div class="jsPanel-content jsPanel-theme-default"></div>
    <-- FOOTER SECTION -->
<-- END JSPANEL DIV -->

You can add any content you want with a variety of options passed to the configuration object.

Content of an existing jsPanel can be edited using the jsPanel.content property in combination with the full range of jQuery methods.


jsPanel options affecting the content

All options are optional and have a default value if no custom value is set in the configuration object of $.jsPanel({config})

  • option.ajax

    is the most flexible way to add content. Internally this option makes use of jQuery.ajax() method. option.ajax expects a configuration object that is similar to the object you would pass to jQuery.ajax(). Additionally you can pass callback function for the jQuery methods .done(), .fail(), .always() and .then() directly to the option.ajax configuration object
    jQuery API .ajax()

  • option.content

    Any value passed to option.content will be appended to the content area using the jQuery method .append() and thus accepts any value that can be passed to the jQuery method like: htmlString or Element or Array or jQuery or a function that returns an HTML string, DOM element(s), or jQuery object
    jQuery API .append()

  • option.iframe

    option.iframe is just a convenience option to ease the use of iframes as content of a jsPanel. Refer to the API page for details.

  • option.load

    is another way to add content. Internally this option makes use of jQuery's .load() method. option.load expects a configuration object that is similar to the object you would pass to jQuery's .load(). Additionally the complete callback receives the jsPanel as fourth argument
    jQuery API .load()

  • option.overflow

    is used to control the scrollbars of the content area. By default the scrollbars are hidden.

  • option.rtl

    implements support for right-to-left text direction. Concerning the content area this option adds the html attribute dir="rtl" and optionally the html attribute lang="/* option.rtl.lang */" to the content div.

  • option.size

    is used to set width and height of the content section of the jsPanel, not width and height of the entire jsPanel.


Content properties

  • jsPanel.content

    The content property of the jsPanel represents the "jQueryfied" <div class="jsPanel-content jsPanel-theme-default"></div> element containg the content of the jsPanel.