![]() ![]() You'll notice on each click the blue DIV will rotate one full turn using Greensock’s TweenLite library.ĭownload using_external_js.zip to see the final result. Now, preview your file in the browser and click on the blue DIV. In the ‘Custom code’ dialog, enter a name for the function (let’s name it ‘rotateDiv’) and add the following custom code:.Action: select Custom, and click on ‘+ Add custom action’ to bring up the Custom code section.Next, Right-click on the element and select “Add event…” to bring up the Events dialog.Once the color is set, we’ll also use the Properties panel to set the id to ‘bluediv’.We’ll then use the Properties panel to set a background color on it, in this example let’s use blue.Now let’s switch back to Design view and add a DIV element using the Tag tool. ![]() For this example, we’ll add the following script element to the list of script elements in the head. In Code view we’ll add a script element to reference the library we want to use.Let’s use one of these libraries to add some interactivity to our ad. For example, DoubleClick hosts common JavaScript libraries such as the popular Greensock animation libraries. You may find commonly used JavaScript libraries on a CDN hosted by your publisher, similar to Enabler.js in the example above. Select ‘bluediv’ in the first keyframe and open the CSS panel.Select the blue DIV and use the Properties panel to give it an id (let’s use ‘bluediv’ for the id in the example below). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |