Jump to content

grabbitmedia

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by grabbitmedia

  1. I am tying to use a jquery slider to plot a line on a canvas when I click a button. I dont know how and where to make the value from the slider a variable that changes with the slider, it just stays with the initial slider value. $(function() { $( "#slider" ).slider({ value:100, min: 0, max: 500, step: 50, slide: function( event, ui ) { $( "#amount" ).val( "$" + ui.value ); } }); $( "#amount" ).val( "$" + $( "#slider" ).slider( "value" ) ); a=$( "#slider" ).slider( "value" ); }); </script> </head> <body> <script> function myFunction() { var c=document.getElementById("www.grabbitmedia.com"); var ctx=c.getContext("2d"); ctx.moveTo(a,50); ctx.lineTo(b,0); ctx.stroke(); } URL: http://able2know.org/topic/217704-1
×
×
  • Create New...