AnzeryFactory is a facade object used to perform commands against the FAQ Lightbox. Make sure to use the ready() function, to assure the lightbox is initialized and all required resources are loaded.
/* Opens the lightbox by using the ready() function on AnzeryFactory. */
$("#open").click(function (e) {
e.preventDefault();
AnzeryFactory.ready();
});
Click here to open the lightbox in default mode.
/* Opens the lightbox and issue a command to display a specific article. */
$("#openArticle").click(function (e) {
e.preventDefault();
AnzeryFactory.ready(function () {
this.command("article", { id: 7735 });
});
});
Click here to open the lightbox and display article with id 7735.
/* Opens the lightbox and issue a search command. */
$("#search").click(function (e) {
e.preventDefault();
AnzeryFactory.ready(function () {
this.command("search", { query: "nystartsjobb" });
});
});
Click here to open the lightbox and perform a search for "nystartsjobb".
/* Opens the lightbox and issue a command to display a specific category. */
$("#openCategory").click(function (e) {
e.preventDefault();
AnzeryFactory.ready(function () {
this.command("search", { categoryId: 1674 });
});
});
Click here to open the lightbox and display category with id 1674.