I use canvas in my application using JavaScript. On that canvas I draw one rectangle. I want to move rectangle with the help of mouse(e.g moving slider) how to move that rectangle using JavaScript or J-query.
A Canvas is literally just a surface that you paint on and none of the things you paint are objects.
If you want to pretend they are objects (like moving around a rectangle or a line) then you need to keep track of everything and do all the hit-testing and re-painting yourself .
I wrote a gentle introduction article on getting started by making rectangles that you can select and drag around. Give that a read.