{"id":1547,"date":"2017-06-16T16:41:37","date_gmt":"2017-06-16T16:41:37","guid":{"rendered":"http:\/\/websterart.com\/wordpress\/?page_id=1547"},"modified":"2020-01-13T20:29:17","modified_gmt":"2020-01-13T20:29:17","slug":"html-5-animated-banner-tutorial","status":"publish","type":"page","link":"https:\/\/websterart.com\/wordpress\/html-5-animated-banner-tutorial\/","title":{"rendered":"Animated Banner Tutorial Part 1"},"content":{"rendered":"<h2>HTML 5 animation tutorial<\/h2>\n<p>This tutorial will walk you through the process of building an 800 by 100px animated banner. We will start from scratch using a logo made in Photoshop. All the text will be styled and positioned with CSS 3 and HTML 5. The animation will be handled by making function calls into the Greensock JavaScript library.<\/p>\n<p>We will be writing JavaScript, but it will be significantly dumbed down. The libraries will handle all the behind the scenes complexity. For example, we can tell something to move by simply saying: &#8220;move this logo 300 pixels over the course of 1 second, and have it bounce as it comes to a stop&#8221;. It won&#8217;t be quite that simple&#8230;but the code will clearly make sense.<\/p>\n<p>We won&#8217;t have to script out the decreasing incremental movements that simulate easing during a bounce, like we used to have to do in Actionscript 3 in Flash. All of that complex math will be handled by pre-written libraries. We simply ask for the type of bounce we want, name the object that needs to bounce, save the file, and refresh the browser. We could do this animation in CSS 3, but at this point in time (2020) , scheduling events on a CSS timeline is very cumbersome.<\/p>\n<p>The JavaScript library developed by the fine people at <a href=\"http:\/\/www.greensock.com\">http:\/\/www.greensock.com<\/a> makes animating over time as easy as it can be in these post flash days. For those of you who do remember the flash playhead, greensock has re-invented it, but using script. You get the draggable playhead, for testing the relationship of moving objects over the course of time. You can drag the playhead both forward and back. This makes it easy to see if your intervals and overlaps are matching your storyboards. I have provided a finished file both with and without the playhead in the lesson files.<\/p>\n<h3>Animation Storyboards<\/h3>\n<p>We won&#8217;t be using storyboards, but keep in mind that most animations start with storyboards. If you&#8217;ve never seen one, a storyboard is a series of stick figure cartoons, like a comic book page.<\/p>\n<p>An animation banner typically starts with a client who has something to sell. There is usually an image involved, accompanied by some descriptive text. Planning the sequence of animated events that will sell the product typically starts with a storyboard.<\/p>\n<p>For this tutorial, I&#8217;m going to give you the finished animation along with it&#8217;s supporting files in a zip file. It will contain the before and after files required to view and build this animated banner. But be aware that to move this animation up to your web server, you will need to be familiar with ftp file management applications, such as filezilla, cPanel or Dreamweaver.<\/p>\n<p>Here is the zip file:<\/p>\n<p><a href=\"http:\/\/websterart.com\/video\/animated-banner.zip\">http:\/\/websterart.com\/video\/animated-banner.zip<\/a><\/p>\n<p>If you are in my college class, it will be a sub folder in resources named animated-banner. Copy that folder to a location on your hardrive, desktop or network where you normally develop websites.<\/p>\n<p>We will reverse engineer it, then re-build it from scratch. This is my attempt at a copy of an animation that <a href=\"https:\/\/codepen.io\/GreenSock\/pen\/zGBgov\" target=\"_blank\" rel=\"noopener noreferrer\">Greensock used to feature on their front page<\/a>. To my knowledge, he has never explained how he did it. I discovered it back when I was transitioning from flash banners to JavaScript. I wanted to turn my students on to what was being done in HTML 5. Greensock has many tutorials on their website, but I was unable to find a detailed explanation of how he did this one. I am constantly re-inventing and re-imagining my lessons to keep them current for my students. This tutorial grew out of the need to illustrate&#8230;in detail&#8230;how to do a state of the art HTML 5 animation.<\/p>\n<p>The process I used to reverse engineer it can be used on any animation. Because it was a fast running animation with some exquisitely timed transitions, it was very challenging to figure out the timing. I needed a playhead to examine the movements in tiny increments. My solution was to record it with screen capture software. There are numerous programs out there, including some free ones, but I used Camtashia. Once I had it recorded, I exported it as an mp4 and had my playhead.<\/p>\n<p>Once I could examine it in slow motion, I built an illustrated storyboard showing all the various elements and how they related to each other over the course of the 10 second animation. I made the illustrations for the storyboard by simply pausing the video and taking screenshots.<\/p>\n<p>I pasted the screenshots into Illustrator, then exported the Illustrator file as a PDF.<br \/>\nHere it is:<br \/>\n<a href=\"http:\/\/websterart.com\/video\/storyboard4.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">Open this pdf<\/a>. I&#8217;m also embedding it in this site, but the pdf has better image quality.<\/p>\n<p><a class=\"single_photoswipe\" href=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-10.png\" data-size=\"1768x1910\"><img decoding=\"async\" class=\"aligncenter wp-image-1612 size-medium\" src=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-10-278x300.png\" alt=\"wordpress-10\" width=\"278\" height=\"300\" srcset=\"https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-10-278x300.png 278w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-10-150x162.png 150w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-10-768x830.png 768w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-10-948x1024.png 948w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-10-167x180.png 167w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-10-555x600.png 555w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-10.png 1768w\" sizes=\"(max-width: 278px) 100vw, 278px\" \/><\/a><\/p>\n<p>With experience and knowledge you can skip some of these steps&#8230;but for a beginner, or if the project is super complex, it&#8217;s always good to start with a storyboard.<\/p>\n<p>I&#8217;ve always found it ironic that Steve Jobs forced us away from flash into JavaScript. Back in the day I could tell you to start flash and set up a new document on the timeline. Now, to start animating with JavaScript we basically have to create the flash environment entirely with script. It&#8217;s not just one or two files, like it used to be with flash. To animate with JavaScript, we need at least a dozen different files, and they all need to communicate with each other. Accurate file management is just one of many skills needed to animate in HTML 5.<\/p>\n<p>If you are using a code editor such as Sublime or Brackets, make sure that those editors open with empty sidebars and zero files open. In Sublime, for example, it typically starts up with the last used files open, and the last defined project files listed in the sidebar. Each editor is different, but do what you have to do to close old files, and remove old project folders from the sidebar. If you don&#8217;t know how, ask Uncle Google.<\/p>\n<p>Dreamweaver has some distinct advantages for developing animations, however at this time I don&#8217;t have Dreamweaver, so I will be using Sublime.<\/p>\n<h3>Getting Started<\/h3>\n<p><strong><span class=\"colored-step\">STEP 1:<\/span><\/strong> Open the <strong>banner-done.html<\/strong> in your browser and watch it run, note that you can drag the slider bar to control the animation, and that it keeps up with the animation automatically if you hit refresh.<\/p>\n<div id=\"attachment_1564\" style=\"width: 160px\" class=\"wp-caption aligncenter\"><a class=\"single_photoswipe\" href=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress-1.png\" data-size=\"2176x454\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1564\" class=\"wp-image-1564 size-thumbnail\" src=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress-1-150x31.png\" alt=\"banner and playhead\" width=\"150\" height=\"31\" srcset=\"https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress-1-150x31.png 150w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress-1-1438x300.png 1438w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress-1-768x160.png 768w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress-1-180x38.png 180w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress-1-300x63.png 300w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress-1-600x125.png 600w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><p id=\"caption-attachment-1564\" class=\"wp-caption-text\">banner and playhead<\/p><\/div>\n<p>&nbsp;<\/p>\n<p>For those of you in my college class, we learned how to set up the slider bar in chapter 3A of the greensock textbook:<\/p>\n<p><a href=\"https:\/\/www.nobledesktop.com\/books\/gsap\">https:\/\/www.nobledesktop.com\/books\/gsap<\/a><\/p>\n<p>This lesson will show you how to build an animated banner similar to this: <a href=\"https:\/\/codepen.io\/GreenSock\/pen\/zGBgov\">https:\/\/codepen.io\/GreenSock\/pen\/zGBgov<\/a><\/p>\n<p>or this: <a href=\"http:\/\/websterart.com\/html\/animation-v4.php\">http:\/\/websterart.com\/html\/animation-v4.php<\/a><\/p>\n<p><strong><span class=\"colored-step\">STEP 2:<\/span> <\/strong>Close banner-done.html and open <strong>banner-start.html <\/strong>in Chrome or Firefox.\u00a0 The banner-start.html will be a blank window in the browser, this is normal.<\/p>\n<p><strong><span class=\"colored-step\">STEP 3:<\/span><\/strong> Right click in the blank browser window and choose view &gt; source. This will open a new tab showing the source code. Note all the links to external files. Lines 6, 12, 13, 14, 15 and 16 all have links to external files. These files get imported by the browser and are essential for the animation to work. If you like analogies, think of the the engine in your car. If you took it out and set it on the floor, it wouldn&#8217;t run. It has to mounted in the car, and it has to be connected to the battery, the gas tank, the air cleaner, the fuel pump&#8230;etc.<\/p>\n<p>Our banner-start.html has to be connected to those 6 files before we can make it run. Those files are all (except the css file) JavaScript files, and they are all (with one exception) prewritten JavaScript libraries that we will never touch.<\/p>\n<div id=\"attachment_1562\" style=\"width: 160px\" class=\"wp-caption aligncenter\"><a class=\"single_photoswipe\" href=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2.png\" data-size=\"2214x1142\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1562\" class=\"wp-image-1562 size-thumbnail\" src=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-150x77.png\" alt=\"click the links in view source page\" width=\"150\" height=\"77\" srcset=\"https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-150x77.png 150w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-300x155.png 300w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-1800x928.png 1800w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-400x206.png 400w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-500x258.png 500w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-600x309.png 600w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-582x300.png 582w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-768x396.png 768w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-1985x1024.png 1985w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress2-180x93.png 180w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><p id=\"caption-attachment-1562\" class=\"wp-caption-text\">click the links in view source page<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><strong><span class=\"colored-step\">STEP 4: <\/span><\/strong>Click each of the links and make sure that the browser can open the linked files. They should open easily. This means you have all the necessary files and folder for the project. Close the new tab or click the browsers back button after checking each link. If the links don&#8217;t open, examine the folder using Windows Explorer or the Mac Finder. Your folder structure must look like this for you to be able to click the links in the view source window. NOTE: this screen shot is from a Mac, but windows explorer view is almost identical.<\/p>\n<div id=\"attachment_1563\" style=\"width: 311px\" class=\"wp-caption aligncenter\"><a class=\"single_photoswipe\" href=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3.png\" data-size=\"1794x1788\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1563\" class=\"wp-image-1563 size-medium\" src=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3-301x300.png\" alt=\"required directory structure\" width=\"301\" height=\"300\" srcset=\"https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3-301x300.png 301w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3-150x149.png 150w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3-768x765.png 768w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3-1027x1024.png 1027w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3-180x180.png 180w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3-300x300.png 300w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3-600x598.png 600w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress3.png 1794w\" sizes=\"(max-width: 301px) 100vw, 301px\" \/><\/a><p id=\"caption-attachment-1563\" class=\"wp-caption-text\">required directory structure<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><strong><span class=\"colored-step\">STEP 5:<\/span> <\/strong>Examine the directory structure above and note that I have reorganized the locations of all of the linked css and javascript files (as compared to the optional greensock book). The two files I did not move were the jquery-ui files: js and css. Those files make the dragable playhead slider work. It&#8217;s very complex, so I left them buried in their original folder structure. Remember that to make this work online that specific directory structure has to be maintained up on the remote server. It will take some careful file management during the uploading process.<\/p>\n<p>NOTE: You can work this tutorial without buying the greensock book. My previous students and I figured it all out by watching his excellent youtube channel. But his book makes it soooo much easier, I highly recommend you buy the book.<\/p>\n<p><strong><span class=\"colored-step\">STEP 6: <\/span><\/strong>In your code editor, open these three files from your folder:<\/p>\n<ul>\n<li>banner-start.html<\/li>\n<li>banner-start.js<\/li>\n<li>banner-start.css<\/li>\n<\/ul>\n<p>On <strong>banner-start.html<\/strong>, inside the <span class=\"highlight\">&lt;body&gt;&lt;\/body&gt;<\/span> tags, start and stop a div with an id of banner. It will look like this when you are done:<\/p>\n<pre class=\"lang:html decode:true\">&lt;!--\r\nthis is banner-start.html\r\n--&gt;\r\n&lt;body&gt;\r\n  &lt;div id=\"banner\"&gt; test 123\r\n  &lt;\/div&gt;&lt;!--end banner div--&gt;\r\n&lt;!-- bunch of script imports will be here already --&gt;\r\n&lt;\/body&gt;<\/pre>\n<p><strong><span class=\"colored-step\">STEP 7: <\/span><\/strong>Add these two rules to <strong>banner-start.css<\/strong>. Save the file and refresh your browser.<\/p>\n<pre class=\"lang:css decode:true\">\/*******\r\nthis is banner-start.css\r\n********\/\r\nbody {\r\n  background-color: gray;\r\n}\r\n#banner {\r\n   height: 90px;\r\n   width:800px;\r\n   background-color: #333;\r\n   border-radius: 15px;\r\n   position: relative;\r\n   \/*opacity: 0;*\/\r\n   font: 0.9em Verdana, Helvetica, sans-serif;\r\n   color: white;\r\n   \/*overflow: hidden;*\/\r\n}<\/pre>\n<p>This is what you should see:<\/p>\n<div id=\"attachment_1571\" style=\"width: 160px\" class=\"wp-caption aligncenter\"><a class=\"single_photoswipe\" href=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress4.gif\" data-size=\"1658x442\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1571\" class=\"wp-image-1571 size-thumbnail\" src=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress4-150x40.gif\" alt=\"round corner banner box\" width=\"150\" height=\"40\" srcset=\"https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress4-150x40.gif 150w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress4-1125x300.gif 1125w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress4-768x205.gif 768w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress4-180x48.gif 180w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress4-300x80.gif 300w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress4-600x160.gif 600w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><p id=\"caption-attachment-1571\" class=\"wp-caption-text\">round corner banner box<\/p><\/div>\n<p><strong><span class=\"colored-step\">STEP 8:<\/span><\/strong> In <strong>banner-start.css<\/strong>, un-comment (activate) the declaration for <span class=\"highlight\">opacity: 0;<\/span> like this:<\/p>\n<pre class=\"lang:css decode:true\">\/******* this is banner-start.css ********\/ \r\nbody { \r\n\tbackground-color: gray; \r\n} \r\n#banner { \r\n\theight: 90px; \r\n\twidth: 800px; \r\n\tbackground-color: #333; \r\n\tborder-radius: 15px; \r\n\tposition: relative; \r\n\topacity: 0; \/*this is now active!*\/\r\n\tfont: 0.9em Verdana, Helvetica, sans-serif; \r\n\tcolor: white; \r\n\t\/*overflow: hidden;*\/ \r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>and refresh your page, you should see nothing. Next we will animate in the appearance of the banner.<\/p>\n<p><strong><span class=\"colored-step\">STEP 9:<\/span><\/strong> Switch to <strong>banner-start.js<\/strong>. This is one of the six JavaScript files we are importing into banner-start.html. It is currently blank because we are just starting the script that will create the magic. Add the code shown below. Refresh your page and you should see the banner rectangle fade in over 1.5 seconds.<\/p>\n<pre class=\"lang:js decode:true\">\/*banner-start.js*\/\r\nvar tl = new TimelineMax();\r\ntl.to(\"#banner\", 1.5, {opacity:1, ease:Cubic.easeOut})<\/pre>\n<p>&nbsp;<\/p>\n<p>Basically we are creating a new<br \/>\nvariable called &#8220;<span class=\"highlight\">tl<\/span>&#8220;. We are assigning<br \/>\nit a new occurence of a virtual timeline called TimelineMax. You can think of this as a Flash or Premiere timeline if you know either of those programs. In the <span class=\"highlight\">tl.to()<\/span> statement we are saying, animate the <span class=\"highlight\">&lt;div id=&#8221;banner&#8221;&gt;<\/span> element over the course of 1.5 seconds from it&#8217;s starting opacity: 0; property (as defined in the style sheet ) to an opacity of 1. And we are using a prebuilt easing called &#8220;Cubic&#8221;. If you don&#8217;t know what easing is, check it out here: <a href=\"https:\/\/greensock.com\/ease-visualizer\">https:\/\/greensock.com\/ease-visualizer\u00a0<\/a><\/p>\n<p>or here:<\/p>\n<p><iframe title=\"GSAP Ease Visualizer\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/IwDFsQh8ImM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>We can write this simple animation code because we are accessing the TimelineMax JavaScript libraries, which were already imported. We could do all this with CSS transforms, or jQuery animations&#8230;but greensock simply makes it easier.<\/p>\n<p>A lot of what we are doing will not make sense unless you have either read the greensock book, or watched his tutorial videos on: <a href=\"https:\/\/www.youtube.com\/user\/GreenSockLearning\">https:\/\/www.youtube.com\/user\/GreenSockLearning<\/a><\/p>\n<h3>The sales pitch<\/h3>\n<p><strong><span class=\"colored-step\">STEP 10:<\/span><\/strong> Open <strong>banner-done.html<\/strong> in your browser. Note that as it runs there is a white playhead moving in time with the animation. The playhead was created with jQuery, JavaScript and the greensock libary all working together. It is explained in detail in the greensock book referenced above. In the image pictured below, I&#8217;ve grabbed the playhead and dragged it until the fourth word (best) is just beginning to appear. It has been programmed to grow and appear into place from zero opacity and a small size. The words appear sequentially via a super cool greensock library called splitText. It is one of the *js libraries we are already importing. To make them animate in, we have to write a line of script that targets that sentence. And by target, I mean we will surround that sentence with a div named: <strong>quote<\/strong>, then speak to the name of the div with JavaScript.<\/p>\n<div id=\"attachment_1578\" style=\"width: 160px\" class=\"wp-caption aligncenter\"><a class=\"single_photoswipe\" href=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-4.png\" data-size=\"2274x604\"><img decoding=\"async\" aria-describedby=\"caption-attachment-1578\" class=\"wp-image-1578 size-thumbnail\" src=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-4-150x40.png\" alt=\"wordpress-split-text\" width=\"150\" height=\"40\" srcset=\"https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-4-150x40.png 150w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-4-1129x300.png 1129w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-4-768x204.png 768w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-4-180x48.png 180w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-4-300x80.png 300w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-4-600x159.png 600w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><p id=\"caption-attachment-1578\" class=\"wp-caption-text\">wordpress-split-text<\/p><\/div>\n<p>&nbsp;<\/p>\n<p><strong><span class=\"colored-step\">STEP 11:<\/span><\/strong> On <strong>banner-start.html<\/strong>, get rid of the &#8220;123&#8221; inside the banner div. Add a <strong>pitchWrapper<\/strong> div, and two div&#8217;s inside that as shown.<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;!--this is banner-start.html--&gt;\r\n&lt;div id=\"banner\"&gt;\r\n   &lt;div id=\"pitchWrapper\"&gt; \r\n     &lt;div id=\"quote\"&gt;&lt;!--this div will be animated with splitText--&gt;\r\n        We make the best Mufflers \r\n     &lt;\/div&gt;\r\n      &lt;div id=\"bouncyGreen\"&gt; \r\n        in Tacoma\r\n      &lt;\/div&gt;\r\n   &lt;\/div&gt;&lt;!--end wrapper div--&gt;\r\n&lt;\/div&gt;&lt;!--end banner div--&gt;<\/pre>\n<p><strong><span class=\"colored-step\">STEP 12:<\/span><\/strong> Switch to <strong>banner-start.css<\/strong>, add the following two new style sheet rules below the existing rules. Note that both elements <span class=\"highlight\">#quote, #bouncyGreen<\/span> have a <span class=\"highlight\">float: left; <\/span>property. Because #bouncyGreen div comes after #quote, #bouncyGreen is the last one to float into place, and ends up on the right, exactly where we want it.<\/p>\n<pre class=\"lang:default decode:true \">\/*this is banner-start.css\r\nThere is code above this...\r\n*\/\r\n#quote {\r\n\tfont:1.5em Verdana, Helvetica, sans-serif;\r\n\tfont-style: bold;\r\n\tcolor: #ccc;\r\n\tfloat: left;\r\n\tletter-spacing: 0.08em;\r\n\tmargin: 25px 0 0 10px;\r\n}\r\n\r\n#bouncyGreen {\r\n\t\r\n\tfont:3em Georgia, Times, serif;\r\n\tfloat: left;\r\n\tcolor: #0f0;\r\n\tmargin: 10px 0 0 0;\/*0ld was margin-top:-11px*\/\r\n\tpadding:0;\r\n}<\/pre>\n<p><a class=\"single_photoswipe\" href=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-5.png\" data-size=\"1640x228\"><img decoding=\"async\" class=\"aligncenter wp-image-1579 size-thumbnail\" src=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-5-150x21.png\" alt=\"\" width=\"150\" height=\"21\" srcset=\"https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-5-150x21.png 150w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-5-768x107.png 768w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-5-180x25.png 180w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-5-300x42.png 300w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-5-600x83.png 600w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/07\/wordpress-5.png 1640w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span class=\"colored-step\">STEP 13:<\/span><\/strong> Switch to <strong>banner-start.js<\/strong>. Add the the code shown below. The new code is on lines 2 and 5. Save the file and refresh the browser on banner-start.html. You should see the words &#8220;We make the best mufflers&#8221; animate in one after the other, separated by about a tenth of a second.<\/p>\n<pre class=\"lang:default decode:true\">\/\/this is banner-start.js\r\nvar mySplitText = new SplitText(\"#quote\", {type:\"words\"});\r\nvar tl = new TimelineMax();\r\ntl.to(\"#banner\", 1.5, {opacity:1, ease:Cubic.easeOut})\r\n.staggerFrom(mySplitText.words, 0.3, {opacity:0, scale:0.4,  ease:Back.easeOut}, 0.15)\r\n<\/pre>\n<p>Explanation: Line two creates a new variable called <strong>mySplitText<\/strong>. It makes a new occurrence of the greensock <strong>SplitText<\/strong> function. The function targets the <strong>#quote<\/strong> div, and specifies that the type of splitting that shall occur is <strong>words<\/strong>, instead of individual letters. The SplitText function breaks apart the sentence into individual div elements so that each can be animated separately. Line five uses the greensock <strong>staggerFrom<\/strong> function. The staggerFrom function means to separate out the words into staggered animations, each separated from the previous word by 0.15 seconds. We specify the zero opacity and a scale of 0.4 (40%) as the starting point at which we start the animation <strong>from<\/strong>. We delay the animation on line 5 from following too closely on the heels of the animation on line 4 with the value of 0.3 seconds.<\/p>\n<p>If you&#8217;d like a deeper understanding of the split text function, here is the youTube video recorded by greensock:<\/p>\n<p><iframe title=\"Introducing SplitText\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/C7Z62o2GQB0?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p><strong><span class=\"colored-step\">STEP 14: <\/span><\/strong>On <strong>banner-start.js<\/strong>, add this line of code below the existing lines:<\/p>\n<pre class=\"lang:default decode:true \">.from(\"#bouncyGreen\", 0.9,{opacity:0, y:50, ease:Elastic.easeOut, delay:0.5})<\/pre>\n<p>&nbsp;<\/p>\n<p>You can see the new code in place below on line 6. This code targets the words &#8220;in Tacoma&#8221;, which are themselves surrounded by a <span class=\"highlight\">#bouncyGreen<\/span> div tag. That tag has been styled with CSS to be green, larger, and to float left until it runs into (floats left toward) the #quote tag.<\/p>\n<p>This new line of JavaScript takes 0.9 seconds to animate the element <strong>from<\/strong> opacity: 0, to the default opacity of 1. It also animates it up to it&#8217;s default floated location<strong> from<\/strong> <span class=\"highlight\">y:50<\/span>, meaning to start from 50 pixels below where it normally lives. We use Elastic easing to make it bounce as it arrives, and we delay it by 0.5 seconds after whatever is happening on line 5.<\/p>\n<p>NOTE: Lines 4, 5 and 6 are considered by JavaScript to be one long command, or, to use the greensock terminology: one timeline. There are not semicolons after lines 4, 5 and 6 because they are all sequential animation commands within the <span class=\"highlight\">tl<\/span> timeline.<\/p>\n<pre class=\"lang:default decode:true\">\/\/this is banner-start.js \r\nvar mySplitText = new SplitText(\"#quote\", {type:\"words\"}); \r\nvar tl = new TimelineMax(); \r\ntl.to(\"#banner\", 1.5, {opacity:1, ease:Cubic.easeOut}) \r\n.staggerFrom(mySplitText.words, 0.3, {opacity:0, scale:0.4, ease:Back.easeOut}, 0.15)\r\n.from(\"#bouncyGreen\", 0.9,{opacity:0, y:50, ease:Elastic.easeOut, delay:0.5})<\/pre>\n<p>&#8211; &#8211; ~ &#8212;<\/p>\n<p>You may have wondered why we already have a pitchWrapper div in our banner-start.html, line 3 below:<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;!--this is banner-start.html--&gt;\r\n&lt;div id=\"banner\"&gt;\r\n   &lt;div id=\"pitchWrapper\"&gt; &lt;!-- we are about to animate (vanish) this div --&gt;\r\n     &lt;div id=\"quote\"&gt;\r\n        We make the best Mufflers \r\n     &lt;\/div&gt;\r\n      &lt;div id=\"bouncyGreen\"&gt; \r\n        in Tacoma\r\n      &lt;\/div&gt;\r\n   &lt;\/div&gt;&lt;!--end pitchWrapper div--&gt;\r\n&lt;\/div&gt;&lt;!--end banner div--&gt;<\/pre>\n<p>It is there because I wanted to target the entire sentence after it is done splitTexting and bouncing into place. Now that it has arrived, I&#8217;d like it to vanish so I can start in on the next series of animations. But rather than simply blinking out, wouldn&#8217;t it be cool if we could make it rear up like the character in the road runner cartoon, pause for a moment, then scream out of view? That is easy to do by simply giving the pitchWrapper div a command.<\/p>\n<p><span class=\"colored-step\"><strong>STEP 15:<\/strong> <\/span>On <strong>banner-start.js<\/strong>, add the code shown on <strong>line 7<\/strong> below:<\/p>\n<pre class=\"lang:js decode:true\">\/\/ this is banner-start.js\r\nvar mySplitText = new SplitText(\"#quote\", {type:\"words\"});\r\nvar tl = new TimelineMax();\r\ntl.to(\"#banner\", 1.5, {opacity:1, ease:Cubic.easeOut})\r\n.staggerFrom(mySplitText.words, 0.3, {opacity:0, scale:0.4,  ease:Back.easeOut}, 0.15)\r\n.from(\"#bouncyGreen\", 0.9,{opacity:0, y:50, ease:Elastic.easeOut, delay:0.5})\r\n.to(\"#pitchWrapper\", 1, {opacity:0, scale:0.3, y:22, ease:Back.easeIn, delay:0.5})<\/pre>\n<p>Note that it speaks to the <span class=\"highlight\">#pitchWrapper<\/span> div, which has two descendant elements. Over the course of one second we are animating it <strong>to<\/strong> an <span class=\"highlight\">opacity: 0<\/span>, while scaling it down to <span class=\"highlight\">0.3<\/span> (30%), while simultaneously lowering it to a <span class=\"highlight\">y:22<\/span> position. This keeps it approximately centered vertically as it shrinks. And we are delaying the start of it&#8217;s animation until half a second after the previous line of animation. Save the file and watch it run. You should see the sentence animate in, then rear up and vanish by shrinking to infinity. This will leave you with a blank gray round corner banner.<\/p>\n<h3>Who we are and contact info<\/h3>\n<p>Now that we&#8217;ve pitched them our advertising slogan, let&#8217;s tell them who we are by animating in our company logo and our phone number.<\/p>\n<p><strong><span class=\"colored-step\">STEP 16:<\/span><\/strong> On <strong>banner-start.html<\/strong>, add the three DOM elements shown below on lines 10, 11 and 12. Note that they come<strong> after<\/strong> the ending wrapper div tag, but <strong>before<\/strong> the ending banner div tag<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;div id=\"banner\"&gt;\r\n\t&lt;div id=\"pitchWrapper\"&gt;\r\n\t\t&lt;div id=\"quote\"&gt;\r\n\t\t\tWe make the best Mufflers \r\n\t\t&lt;\/div&gt;\r\n\t\t&lt;div id=\"bouncyGreen\"&gt;\r\n\t\t\tin Tacoma\r\n\t\t&lt;\/div&gt;\r\n\t&lt;\/div&gt;&lt;!--end pitchWrapper div--&gt;\r\n\t&lt;img src=\"images\/simon2.png\" alt=\"simon\" id=\"simon\"&gt;&lt;!-- new line --&gt;\r\n\t&lt;h1 id=\"callUs\"&gt;Call our Cellphone:&lt;\/h1&gt;&lt;!-- new line --&gt;\r\n\t&lt;h2 id=\"phoneNumber\"&gt;253-234-5678&lt;\/h2&gt;&lt;!-- new line --&gt;\r\n&lt;\/div&gt;&lt;!--end banner div--&gt;<\/pre>\n<p>The image I&#8217;m using should have been in the zip file you downloaded or got from the college resources folder. If you&#8217;d like to use your own image, be aware that it must measure 52 x 88 pixels, and you need to export it out of Photoshop as a PNG-24 with transparency enabled. To make that image, I dragged an Illustrator file into Photoshop. You could also take a picture of yourself, or whatever it is that you are selling, remove the background so it has transparency, shrink it down, then export it (file &gt; export &gt; save for web legacy) as a PNG 24 into this images folder. As long as you save it with the same name, and make it the same size, it should be able to replace mine and animate with all the same code.<\/p>\n<p><strong><span class=\"colored-step\">STEP 17:<\/span><\/strong> On <strong>banner-start.css<\/strong>, add the following three style sheet rules to control the three DOM elements we added in step one. These new rules go below all the other rules. Save the file and view the animation.<\/p>\n<pre class=\"lang:css decode:true\">\/**** #bouncyGreen rule is here....not shown****\/\r\n#simon{\r\n\tposition:absolute;\r\n\tleft:10px;\r\n\ttop:0px;\r\n\tmargin:0;\r\n\tpadding:0;\r\n\tz-index: 6;\r\n}\r\n\r\nh1#callUs{\r\n\tfont-family: Georgia, Times, serif;\r\n\tfont-size: 1.5em;\r\n\tcolor:#0f0;\r\n\tposition:absolute;\r\n\tleft: 90px;\r\n\ttop:10px;\r\n\tmargin:0;\r\n\tpadding:0;\r\n\tz-index:8;\r\n}\r\nh2#phoneNumber{\r\n\tfont-family: Georgia, Times, serif;\r\n\tfont-size: 1.0em;\r\n\tletter-spacing: 3px;\r\n\tcolor:#fff;\r\n\tposition:absolute;\r\n\tleft:90px;\r\n\ttop:45px;\r\n\tmargin:0;\r\n\tpadding:0;\r\n\tz-index:7;\t\r\n}<\/pre>\n<p>You will have to wait about 5 seconds for all the animations to run their course, but at the end of that time you should see the three elements sitting on the page like this:<\/p>\n<p><a class=\"single_photoswipe\" href=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress6.gif\" data-size=\"1648x212\"><img decoding=\"async\" class=\"aligncenter wp-image-1595 size-thumbnail\" src=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress6-150x19.gif\" alt=\"Wordpress6\" width=\"150\" height=\"19\" srcset=\"https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress6-150x19.gif 150w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress6-768x99.gif 768w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress6-180x23.gif 180w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress6-300x39.gif 300w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress6-600x77.gif 600w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>A couple things in this new code bear explaining. Higher in the style sheet code, not shown here, you may not have noticed that I have already told the <strong>#banner<\/strong> div to have a <span class=\"highlight\">position: relative<\/span> property. This is required if you&#8217;d like to have the freedom to place the banner anywhere on the webpage. By using <span class=\"highlight\">position: relative;<\/span> we are able to use <span class=\"highlight\">position: absolute;<\/span> on elements inside the #banner div, and not have to worry about where those descendant elements are being positioned relative to the body of the web page. We can use positioning numbers (<span class=\"highlight\">position: absolute; top: 45px;<\/span>) that are measured from the perimeter of their parent which is #banner.<\/p>\n<p>So, to review, if you need to use absolute positioning on something (<strong>#simon<\/strong>) that might be in a parent element (<strong>#banner<\/strong>) whose position could change relative to the <span class=\"highlight\">&lt;body&gt;&lt;\/body&gt;<\/span> element&#8230;use <span class=\"highlight\">position: relative;<\/span> on the <strong>parent<\/strong> element (#banner) and <span class=\"highlight\">position: absolute;<\/span> on the <strong>child<\/strong> element (#simon)<\/p>\n<p><strong><span class=\"colored-step\">STEP 18:<\/span><\/strong> On banner-start.js, add the following code below the existing code, shown as line 8 below. Refresh the page and note how the &#8220;Call Us&#8221; text slides in from the side.<\/p>\n<pre class=\"lang:js decode:true\">\/\/ this is banner-start.js\r\nvar mySplitText = new SplitText(\"#quote\", {type:\"words\"});\r\nvar tl = new TimelineMax();\r\ntl.to(\"#banner\", 1.5, {opacity:1, ease:Cubic.easeOut})\r\n.staggerFrom(mySplitText.words, 0.3, {opacity:0, scale:0.4,  ease:Back.easeOut}, 0.15)\r\n.from(\"#bouncyGreen\", 0.9,{opacity:0, y:50, ease:Elastic.easeOut, delay:0.5})\r\n.to(\"#pitchWrapper\", 1, {opacity:0, scale:0.3, y:22, ease:Back.easeIn, delay:0.5})\r\n.from(\"#callUs\", 0.5,{x:-430, ease:Cubic.easeOut, delay:0.5})<\/pre>\n<p>This is done by positioning it to an x value of negative 430. So instead of telling it to be, for example: 40 pixels from the left of the edge of it&#8217;s parent, we tell it to be <span class=\"highlight\">x:-430<\/span>. This moves it offscreen out of view 430 pixels to the left. If you like analogies, imagine a tube of lipstick laying on it&#8217;s side. The lipstick (cherry red of course) could be said to have a negative x value equal to it&#8217;s length. It is there, but it&#8217;s negatively positioned inside the plastic tube. To animate the <span class=\"highlight\">#callUs<\/span> element into view we tell it to come in from x:-430. After the animation, it arrives at it&#8217;s resting spot, which we defined in the CSS.<\/p>\n<p><strong><span class=\"colored-step\">STEP 19:<\/span><\/strong> On banner-start.js, add these two new commands at the bottom, shown as lines 9 and 10 below. Save and refresh the page.<\/p>\n<pre class=\"lang:js decode:true\">\/\/ this is banner-start.js\r\nvar mySplitText = new SplitText(\"#quote\", {type:\"words\"});\r\nvar tl = new TimelineMax();\r\ntl.to(\"#banner\", 1.5, {opacity:1, ease:Cubic.easeOut})\r\n.staggerFrom(mySplitText.words, 0.3, {opacity:0, scale:0.4,  ease:Back.easeOut}, 0.15)\r\n.from(\"#bouncyGreen\", 0.9,{opacity:0, y:50, ease:Elastic.easeOut, delay:0.5})\r\n.to(\"#pitchWrapper\", 1, {opacity:0, scale:0.3, y:22, ease:Back.easeIn, delay:0.5})\r\n.from(\"#callUs\", 0.5,{x:-430, ease:Cubic.easeOut, delay:0.5})\r\n.from(\"#phoneNumber\", 0.5,{x:-430, ease:Cubic.easeOut},\"-=0.4\")\r\n.from(\"#simon\", 0.5,{x:-100, ease:Cubic.easeOut},\"-=0.4\")<\/pre>\n<p>Note how all three objects slide into view very quickly. If you watch carefully you will see that the <strong>#callUs<\/strong> is the first one to come into view, but while it is still moving the other two elements (<strong>#phoneNumber<\/strong> &amp; <strong>#simon<\/strong>) are also moving into view. They are all moving simultaneously. I have to give a shout out to the fine folks over at greensock. This is beautiful work. The way they did it&#8230;or at least the way I have recreated it, is with the odd looking code at the end of each command. Normally we would have a delay there, but instead, notice how I&#8217;ve inserted something in between the closing curly brace and parenthesis.<\/p>\n<p><a class=\"single_photoswipe\" href=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7.png\" data-size=\"1956x544\"><img decoding=\"async\" class=\"aligncenter size-medium wp-image-1598\" src=\"http:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-1079x300.png\" alt=\"wordpress7\" width=\"1079\" height=\"300\" srcset=\"https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-1079x300.png 1079w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-300x83.png 300w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-1800x501.png 1800w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-400x111.png 400w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-500x139.png 500w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-600x167.png 600w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-150x42.png 150w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-768x214.png 768w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7-180x50.png 180w, https:\/\/websterart.com\/wordpress\/wp-content\/uploads\/2017\/06\/wordpress7.png 1956w\" sizes=\"(max-width: 1079px) 100vw, 1079px\" \/><\/a><\/p>\n<p>What I&#8217;ve inserted is a <strong>comma <\/strong>followed by a<strong> string value<\/strong> (data inside double quotes) that acts as a reverse delay. Instead of letting each element animate sequentially, and or after a delay value, I&#8217;ve used this string value: <span class=\"highlight\">&#8220;-=0.4&#8221;<\/span>. This means, take the current time at which it would have animated, and make it equal to that time after the browser has subtracted four tenths of a second from that time. This allows us to have something happen during, or even before the previous animation command. Bottom line is that these string value delays allow concurrent and or overlapping animation movements.<\/p>\n<p><a href=\"http:\/\/websterart.com\/wordpress\/animated-banner-tutorial-part-2\/\">go to part 2 of banner tutorial<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTML 5 animation tutorial This tutorial will walk you through the process of building an 800 by 100px animated banner. We will start from scratch using a logo made in Photoshop. All the text will be styled and positioned with CSS 3 and HTML 5. The animation will be handled by making function calls into [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-1547","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/websterart.com\/wordpress\/wp-json\/wp\/v2\/pages\/1547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/websterart.com\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/websterart.com\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/websterart.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/websterart.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1547"}],"version-history":[{"count":46,"href":"https:\/\/websterart.com\/wordpress\/wp-json\/wp\/v2\/pages\/1547\/revisions"}],"predecessor-version":[{"id":3487,"href":"https:\/\/websterart.com\/wordpress\/wp-json\/wp\/v2\/pages\/1547\/revisions\/3487"}],"wp:attachment":[{"href":"https:\/\/websterart.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}