Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iphonepiephone

macrumors regular
Original poster
Oct 9, 2009
213
0
Hi guys. I wrote something almost identical to this on Ubuntu, but now I wrote this on my Mac (unrelated I am sure) and it does not work - am I missing something obvious here? The jQuery & jQueryui libs are in the "js/" folder, as coded, and the names are correct...

I should have a red DIV, which I can drag around... but don't :-/

Thx

{{EDIT}} Literally after I posted this, the error GLARED at me... marked in red... forgot to add the quotes! :rolleyes:

This had bugged me all afternoon yesterday, and all evening last night... what a n00b! :D

Code:
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>jQuery draggable test</title>
	<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
	<script type="text/javascript">
	$(document).ready(function(){
	$([COLOR="Red"]"[/COLOR]div[COLOR="Red"]"[/COLOR]).draggable();
		
		
	});
	
	
	</script>
	
</head>
<body>
<div id="redbox" style="width:250px; height:250px; background-color:red; border:dotted"></div>
</body>
</html>
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.