jQuery conflicting?

256 Views Asked by At

I am trying to load jQuery on a RightNow FAQ system and I'm not sure if it has any conflicts between the JS files that are loaded by default by RightNow.

I've added these lines to my file:

<script src="https://www.google.com/jsapi?key=MYKEY" type="text/javascript"></script>
<script>
 google.load("jquery", "1.4.4");
  google.load("jqueryui", "1.8.7");
</script>
<script>
jQuery.noConflict();
if (typeof jQuery == 'undefined') {  
    alert("jquery is NOT loaded");
} else {
    alert("jquery is loaded");
}

 jQuery(function() {
  jQuery( "#dialog" ).dialog();
 });

</script>
<div id="dialog"><p>test</p></div>

(MYKEY was replaced by the real key of course).

When visiting the page I get the "jquery is loaded", but I don't see the dialog box. Am I testing it correctly? does that mean there's a conflict?

Do you guys have any other way of testing/making this thing work?

Thanks,

2

There are 2 best solutions below

0
On

This seems to work for me. The only thing you seem to have forgotten, is loading jquery-ui.css. Is that your problem?

0
On

Your code may be more stable if you call your dialog command from within "on document ready".