Skip to content

Commit

Permalink
Document initialization of multiple browse jQuery plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Nov 30, 2017
1 parent e0e3418 commit 526ee5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cookbook/usage_requirements.rst.inc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ or just include the provided Twig template:

{% include '@NetgenContentBrowser/page_head.html.twig' %}

All HTML code blocks which have ``js-input-browse`` CSS class will be automatically initialized
All HTML code blocks which have ``js-input-browse`` or ``js-multiple-browse`` CSS class will be automatically initialized
on document ready with jQuery and the plugin which are included in ``netgen-content-browser.js``.

If you use another CSS class, or if you add content browser HTML code via AJAX to your page,
Expand All @@ -25,4 +25,5 @@ you will need to manually initialize the plugin on those elements:
.. code-block:: javascript

// ngc_jquery variable holds jQuery included with Netgen Content Browser
ngc_jquery('.js-input-browse').input_browse();
ngc_jquery('.js-input-browse').input_browse(); // for single item select
ngc_jquery('.js-multiple-browse').multiple_browse(); // for multiple item select

0 comments on commit 526ee5e

Please sign in to comment.