Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Does it work, if I specify a folder for Operas userjs and that folder contains jQuery.js? Can I then use jQuery in my own scripts?

share|improve this question

2 Answers 2

No, don't do that. Not raw and unchecked at least.

It won't work and what you'll find is that sites that already use jQuery may take forever to load nothing but an expectant blank page.

You can try and throw a check around your jquery.js file in your userscripts directory like so:

 if (typeof jQuery != 'undefined') {

    //the jquery.js file is here

 }

That should stop the conflict of having two jQuery libraries loaded on the one page.

No guarantees that that will work though.

share|improve this answer

Or use jQuery No Conflict

Ex:

<script type="text/javascript">
  $.noConflict();
  jQuery(document).ready(function($) {
    // Code that uses jQuery's $ can follow here.
  });
  // Code that uses other library's $ can follow here.
</script>
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.