0

I use primefaces for my view. Primefaces comes with jQuery. But i cant use for example the draggable() - function because the firefox debugger says that this is not a function - why ?

html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:b="http://bootsfaces.net/ui">

<h:head>
<title>DRAGGING AROUND</title>
<h:outputScript library="js" name="script.js"></h:outputScript>
</h:head>
<h:body>
<div id="element">
    <p:inputText id="textField"></p:inputText>
</div>
</h:body>
</html>

And my script.js:

$(document).ready(function() {

$("#element").draggable({ cancel: null });


});
Captai-N
  • 1,124
  • 3
  • 15
  • 26

0 Answers0