.draggable is not a function


I try to make my first steps @jui draggable.

So at my running application I created an new action with an new view. The code inside the view comes from the jQuery documentation (http://jqueryui.com/demos/draggable/) an looks like this (copy&past, quick&dirty):


	#draggable { width: 150px; height: 150px; padding: 0.5em; }



	$(function() {

		$( "#draggable" ).draggable();



<div class="demo">

<div id="draggable" class="ui-widget-content">

	<p>Drag me around</p>



But i get the following error:

What could be the reason, because other jQuery elements working good at this page?!

Thank you

You need to ensure you’ve included the appropriate jquery UI stuff. Take a look at CClientScript and the registerCoreScript stuff like ‘jquery.ui’.

thank you… right now i found the answer here:

http://www.yiiframework.com/forum/index.php?/topic/8787-how-to-register-jquery-ui-is-it-bundled-with-yii-1-1-1/page__view__findpost__p__83903 :slight_smile: