I'm a complete newbie to jQuery and am trying to use farbtastic (a jquery
colour picker)

The documentation suggests calling the function on document load:

<script type="text/javascript">
  $(document).ready(function() {
    $('#colorpicker').farbtastic('#color');
  });
</script>

However I am loading the associated elements:

  <form>
    <input type="text" id="color" name="color" value="#123456" />
  </form>
  <div id="colorpicker">
  </div>

from an html file using:

function paint() {
$("#mid").load("paint.htm");
}
</script>

How would I then go about executing 

$('#colorpicker').farbtastic('#color');

I've already tried numerous incantations such as:

function paint() {
$("#mid").load("paint.htm"),
$('#colorpicker').farbtastic('#color');
}

but I just can't seem to get it to work.

Help will be very much appreciated =)
-- 
View this message in context: 
http://www.nabble.com/Calling-functions-tp21209391s27240p21209391.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to