Jump to content
GreenSock

Search the Community

Showing results for tags 'draggable change css properti'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. Hi I'm learning how to use Draggable. I have some divs styled as coloured boxes with some basic text in. <div id="answer1" class="box-answer"><span class="text">a ratio</span></div> I use the following Javascript to facilitate the div being Draggable and then to change the colour of the box when it receives an onClick. I'm not sure why, but it doesn't seem to work Draggable.create(".box-answer", { type:"x,y", bounds: "#container", throwProps:true, edgeResistance:0.35, onClick:function() { console.log("clicked", this.target.id ); $( "#"+this.target.id ).css("background-color","#333333"); }, onDragEnd:function() { console.log("drag ended"); } }); If anyone can show me how I change the CSS properties of a Draggable element after receiving a mouseEvent I'd be very grateful. Many thanks in advance
×