Jquery-Ui dialog only working locally
I'm new to Jquery and am running into a Problem. The Jquery code that I write only 开发者_运维技巧works Locally, as soon as i upload it to my host(godaddy.com) it stops working. Right now the website isn't really functional because i wanted too simplyfy the problem. I'm using google API to retrieve the Jquery library. When i use the $
sign shortcut instead of "Jquery." The function that opens the dialog box(dia) runs but skips over the part the should open the dialog. When i use the Jquery object the function is skipped over completely and as far as i can tell from the errors, the function no longer exists from the browsers point of view. The website I'm working on is kind of an experiment, you can find it at www.mgeffects.com. When you click on the I'm in a dialog
div tag it should popup the dialog as well as an alert i put in place as part of the debugging process, instead it does nothing. Right now its using "JQuery" instead of the $
sign.
Thanks for any help i get.(by the way ignore the PHP errors you get in the black div tag.)
You are doing your selectors wrong:
this is not a valid use:
// The dot after jQuery shouldn't be there
jQuery.("#dialog").dialog('open');
use this instead:
jQuery("#dialog").dialog('open');
//or
$("#dialog").dialog('open');
Also you are including jQuery twice:
//HERE
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js">
<script type="text/javascript">
<style type="text/css">
//AND HERE
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript">
精彩评论