Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can DokuWiki & jQuery play together?

I'm having some trouble getting jQuery to play nice with DokuWiki - has anyone already done this successfully?

At the moment, including jQuery reuslts in all sorts of JS functionality breaking, and I'm having trouble tracking down the source of the problem. What are some things to look for that tend to conflict with jQuery?

like image 763
Wilco Avatar asked Jan 29 '09 03:01

Wilco


People also ask

What is DokuWiki used for?

DokuWiki is a simple to use and highly versatile Open Source wiki software that doesn't require a database. It is loved by users for its clean and readable syntax. The ease of maintenance, backup and integration makes it an administrator's favorite.

Can DokuWiki be used offline?

Dokukiwix is a plugin for Dokuwiki, a powerful file-based Wiki engine. It allows you to generate a static HTML version of your wiki, so that your users can download it and then browse your wiki while being offline.

Is DokuWiki free?

DokuWiki is available free of charge under the GNU General Public License Version 2.

How does DokuWiki work?

DokuWiki has an integrated indexed search with which a user can search for keywords and phrases on the wiki. DokuWiki uses a simple markup language similar to that of MediaWiki. Like MediaWiki it makes use of free links, but CamelCase links can optionally be enabled. WYSIWYG editors are available as plugins.


2 Answers

I'm not familiar with DokuWiki personally but if something is breaking just when you include jQuery then it's probably a conflict with the '$' variable in jQuery. You can use jQuery's noConflict method to get around that, more information here: http://docs.jquery.com/Using_jQuery_with_Other_Libraries

See also this Stack Overflow post: jQuery & Prototype Conflict

like image 150
John Resig Avatar answered Sep 21 '22 06:09

John Resig


You can usually avoid any jQuery conflicts by using the following right after you load jquery.js:

jQuery.noConflict();

Then, it won't overwrite the $ variable, which is most often the source of trouble in these JS library conflicts. You'll need to call jQuery functions using jQuery, though. Examples:

jQuery(function() { ... }); // $(function ...
jQuery(".klass").hide();    // $(".klass" ...
like image 33
Sophie Alpert Avatar answered Sep 20 '22 06:09

Sophie Alpert