利用TweenMax針對HTML頁面製作動畫 – jQuery Mobile篇
在Dreamweaver5.5之後多了一個jQuery Mobile面板,主要是利用jQuery來製作一些行動裝置的元素,接下來這篇文章就利用Dreamweaver提供的幾項元素加上TweenMax來製作手機動畫頁面。
因為這篇文章應用到的動畫功能,依舊和前兩篇差不多,所以就直接看範例吧!首先,第一個範例是利用「jQuery 翻轉切換開關」來控制動畫的播放,除了可以從前面的連結看到這個範例之外,也因為這是特別針對行動裝置所設計的案例,大家也可以在手機輸入「goo.gl/LofiK」網址來觀賞,下面是本範例整個網頁的程式碼:
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalabke=no, width=device-width" /> <title>貓咪欣賞</title> <link href="jquery-mobile/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css"> <script src="jquery-mobile/jquery-1.6.4.min.js" type="text/javascript"></script> <script src="jquery-mobile/jquery.mobile-1.0.min.js" type="text/javascript"></script> <script src="src/minified/TweenMax.min.js"></script> <style type="text/css"> * { margin: 0px; padding: 0px; } #photo { text-align: center; } #selector { text-align: center; width: 50%; margin-left: auto; margin-right: auto; } </style> <script language="javascript"> var playNo = 1; /* 定義目前播放張數變數 */ function photoPlay() { var controler = document.getElementById("flipswitch"); if (controler.options[controler.selectedIndex].value == "on") { clock = setInterval(timer, 5000); } else { clearInterval(clock); } /* 設定每五秒執行timer函數 */ function timer() { var pic = document.getElementById("photo"); /* 利用pic紀錄畫面中ID為photo的元素 */ playNo++; /* 增加張數 */ if (playNo > 19) { playNo = 1; } /* 設定超過圖片張數後從頭播放 */ TweenMax.to(pic, 1, { css: { alpha: 0 }, ease: Expo.easeIn, onComplete: function () { pic.innerHTML = "<img src=photo/photo" + playNo + ".jpg width=300 height=200>"; TweenMax.to(pic, 1, { css: { alpha: 1 }, ease: Expo.easeOut }); } }); } } </script> </head> <body onLoad="photoPlay()"> <div data-role="page" id="page"> <div data-role="header"> <h1>貓咪欣賞</h1> </div> <div data-role="content"> <div id="photo"><img src="photo/photo1.jpg"></div> <div data-role="fieldcontain" id="selector"> <select name="flipswitch" id="flipswitch" onChange="photoPlay()" data-role="slider"> <option value="off">關閉</option> <option value="on" selected>開啟</option> </select> </div> </div> <div data-role="footer"> <h4>©2012 Copyright Stanley Ma Cloud Research.</h4> </div> </div> </body> </html>
接下來的第二個範例在程式上面會比較複雜,因為想要加強上一個範例的互動性,所以在同樣的範例上面增加「上一張」、「下一張」與「播放控制」的功能,可在手機輸入「goo.gl/GyAVt」網址觀賞,如果你仔細看的話,會發現這個範例中呼叫網頁元素的語法有改變,其實既然是利用jQuery來製作,本來就可以利用jQuery所提供呼叫網頁元素的指令來製作會比較方便,總之是因為有了下面這行語法,才可以利用這種方式來呼叫的喔!
<script src="jquery-mobile/jquery-1.6.4.min.js" type="text/javascript"></script>
下面是本範例整個網頁的程式碼:
<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalabke=no, width=device-width" /> <title>貓咪欣賞</title> <style type="text/css"> * { margin: 0px; padding: 0px; } #photo { text-align: center; } #selector { text-align: center; width: 50%; margin-left: auto; margin-right: auto; } #count { text-align: center; width: 50%; margin-left: auto; margin-right: auto; font-size: 12px; } </style> <link href="jquery-mobile/jquery.mobile-1.0.min.css" rel="stylesheet" type="text/css"> <script src="jquery-mobile/jquery-1.6.4.min.js" type="text/javascript"></script> <script src="jquery-mobile/jquery.mobile-1.0.min.js" type="text/javascript"></script> <script src="src/minified/TweenMax.min.js"></script> <script language="javascript"> var playing = 1; /* 偵測目前是否為播放中的變數(1為播放0為暫停) */ var playNo = 1; /* 定義目前播放張數變數 */ /* 執行計時器 */ function photoPlay() { clock = setInterval(timer, 5000); } /* 計時執行函數 */ function timer() { playNo++; /* 增加張數 */ checkPlayNo() /* 呼叫檢查張數是否有誤的函數 */ photoSlide(); /* 呼叫動畫切換照片的函數 */ } /* 動畫切換照片的函數 */ function photoSlide() { var pic = $("#photo"); /* 利用pic紀錄畫面中ID為photo的元素 */ TweenMax.to(pic, 0.5, { css: { alpha: 0 }, ease: Expo.easeIn, onComplete: function () { pic.html("<img src=photo/photo" + playNo + ".jpg width=300 height=200>"); TweenMax.to(pic, 1, { css: { alpha: 1 }, ease: Expo.easeOut }); } }); $("#count").html(playNo + " / 19"); /* 更換顯示張數的文字 */ } /* 檢查張數是否有誤的函數 */ function checkPlayNo() { if (playNo > 19) { playNo = 1; } else if (playNo < 1) { playNo = 19; } } /* 前往上一張的函數 */ function prevFn() { clearInterval(clock); playNo--; checkPlayNo() photoSlide(); photoPlay(); } /* 前往下一張的函數 */ function nextFn() { clearInterval(clock); playNo++; checkPlayNo() photoSlide(); photoPlay(); } /* 播放控制函數 */ function controlFn() { if (playing == 1) { playing = 0; $("#controlBtn").html("播放") clearInterval(clock); } else if (playing == 0) { playing = 1; $("#controlBtn").html("暫停") clock = setInterval(timer, 5000); } } </script> </head> <body onLoad="photoPlay()"> <div data-role="page" id="page"> <div data-role="header"> <h1>貓咪欣賞</h1> </div> <div data-role="content"> <div id="photo"><img src="photo/photo1.jpg"></div> <div data-role="controlgroup" data-type="horizontal" id="selector"><a href="#" data-role="button" id="prevBtn" onClick="prevFn()">上一張</a><a href="#" data-role="button" onClick="controlFn()"><label id="controlBtn">暫停</label></a><a href="#" data-role="button" onClick="nextFn()">下一張</a></div> <div id="count">1 / 19</div> </div> <div data-role="footer"> <h4>©2012 Copyright Stanley Ma Cloud Research.</h4> </div> </div> </body> </html>
希望大家看過這幾篇「利用TweenMax針對HTML頁面製作動畫」的範例之後,可以更順利的創作出自己的網頁。
vibration analysis
The Value of Vibration Control Apparatus in Industrial Equipment
In production contexts, machinery along with spinning devices serve as the backbone of operations. However, an of the highly common challenges which could affect its functionality and lifespan remains oscillation. Oscillation could lead to a range of issues, from reduced perfection along with effectiveness leading to greater erosion, ultimately causing high-cost delays and fixes. This scenario is the point where vibration regulation equipment becomes vital.
Why Vibration Management is Important
Vibration in machinery can result in various harmful effects:
Decreased Functional Productivity: Excessive resonance might result in misalignments along with instability, minimizing the performance of the devices. This might result in reduced output times as well as elevated electricity usage.
Elevated Deterioration: Persistent vibrations accelerates the erosion to mechanical parts, leading to more frequent upkeep along with a potential for unanticipated unforeseen malfunctions. This doesn’t merely heightens operational costs but also limits the longevity of the equipment.
Safety Risks: Unmanaged vibration can introduce major dangers both to the machinery and the machines as well as the operators. In, serious conditions, it could cause disastrous equipment breakdown, jeopardizing personnel along with leading to significant damage in the site.
Precision along with Quality Challenges: For businesses which depend on high precision, for example manufacturing or space industry, vibrations can result in inaccuracies with the manufacturing process, causing defects and increased waste.
Reasonably Priced Approaches for Oscillation Control
Investing into oscillation control systems is not just necessary and also a wise choice for any business any company dependent on equipment. The offered modern vibration regulation equipment are designed to mitigate vibrations from various machinery and rotating machinery, ensuring uninterrupted along with efficient operations.
What sets our apparatus from others remains its affordability. We understand the value of affordability in the modern competitive marketplace, which is why we offer premium vibration management solutions at costs that are reasonable.
Opting for our equipment, you’re not only safeguarding your mechanical systems and boosting its operational effectiveness but also putting investment in the long-term achievement of your company.
Conclusion
Vibration management remains a critical aspect of maintaining the effectiveness, safety, as well as lifespan of your equipment. Through our cost-effective vibration management tools, one can make sure your processes function efficiently, your products are of high quality, and all personnel remain safe. Do not let resonance jeopardize your operations—invest in the proper tools now.
Do Not Buy Into These “Trends” Concerning Adult ADHD Test online adhd test adults
Three Greatest Moments In Repairs To Double Glazed Windows History Window repairs
A Complete Guide To Private Psychiatrist Uk Dos
And Don’ts private psychology near me (Hannelore)
You’ll Never Be Able To Figure Out This Treadmill Home’s Secrets
treadmill home
Are Robot Vacuum And Mop Pet Hair The Most Effective Thing That
Ever Was? best robot vacuum for pet hair and carpet
Guide To Fleshlight Best: The Intermediate Guide
To Fleshlight Best fleshlight best
Дезинфекция Москва dezinfekciya-mcd.ru
По запросу служба дезинфекции Вы на правильном пути. Мы значимся официальной дезинфекционной и санитарной службой города Москва. Все работники сертифицированы, оборудование и продукция одобрены Роспотребнадзором, поэтому не нужно сомневаться, позвонив нам, всё пройдет в самом лучшем виде. Также будет действовать гарантия до 5 лет на представленные услуги.
The 10 Worst Coffee Beans FAILURES Of All Time Could
Have Been Prevented coffee bean shop near me – Billy –
Five Killer Quora Answers To Treadmills Sale UK treadmills sale Uk
Treadmills Near Me Tools To Help You Manage Your Everyday Lifethe Only Treadmills Near Me Trick That
Every Person Should Be Able To treadmills near me (https://atozbookmark.com/story16366996/the-best-tread-mills-strategies-to-transform-your-life)
How Treatment For ADHD Adults Can Be Your
Next Big Obsession Treatments For Adhd
The Motive Behind 4 Wheeled Electric Scooters Is The Most Popular Topic In 2023 scooters
4 wheels, Joshua,
Five Killer Quora Answers To Fold Away Treadmill UK Fold away treadmill uk
Twin Pull Out Couch Tools To Improve Your Daily Life Twin Pull Out
Couch Trick Every Person Should Learn Twin pull out
couch; athosworld.haliya.net,
Will Double Double Bunk Beds Never Rule The World? bunk with double bed
The Importance of Vibrations Management Equipment in Machines
Inside industrial settings, devices and turning equipment act as the foundation of production. Yet, one of the highly prevalent problems that may obstruct their operation and longevity is vibrations. Vibration could result in a variety of challenges, such as reduced accuracy along with effectiveness to increased wear and tear, ultimately resulting in high-cost interruptions and maintenance. This scenario is when vibration regulation apparatus proves to be critical.
Why Vibration Control proves Necessary
Vibration inside equipment may cause several detrimental consequences:
Decreased Functional Productivity: Excess resonance might cause discrepancies and imbalance, decreasing the efficiency of such machinery. This may cause delayed production times as well as higher power consumption.
Heightened Deterioration: Ongoing resonance hastens total wear and tear of mechanical parts, causing more frequent maintenance and the potential for unexpected breakdowns. This not only raises operating costs but also reduces the longevity of your equipment.
Security Dangers: Unchecked vibrations can present major dangers to the machinery and the machinery and the operators. In extreme situations, severe cases, these might lead to cataclysmic equipment failure, threatening operators as well as leading to widespread damage across the site.
Accuracy as well as Quality Challenges: In fields that depend on precise production, such as industrial sectors and space industry, vibrations can result in errors with production, resulting in flawed products as well as increased waste.
Economical Options for Oscillation Control
Putting money into oscillation control systems is not just necessary but a wise choice for any organization dependent on machines. Our advanced vibration management systems work to designed to eliminate oscillation from any machinery or rotating machinery, ensuring uninterrupted and efficient operations.
One thing that distinguishes our systems apart is its cost-effectiveness. We understand the significance of cost-effectiveness inside the modern competitive marketplace, and for that reason we offer top-tier vibration regulation systems at prices that are affordable.
Opting for our systems, you aren’t simply protecting your mechanical systems and enhancing its operational effectiveness but also investing into the enduring success in your organization.
Conclusion
Vibration management is a critical factor of maintaining the efficiency, security, and durability of your industrial equipment. With our affordable oscillation control systems, one can ensure your operations function efficiently, your products maintain top quality, along with your workers remain safe. Do not allow vibration undermine your operations—invest in the correct apparatus today.
Mesothelioma lawyers aid victims and their families
throughout the legal process. They prepare cases, file
lawsuits, and Asbestos Settlement trust claims and negotiate settlements,
as well as fight for fair verdicts at trial.
You’ll Never Guess This Single Seater Buggy For Sale’s Tricks Single Seater Buggy For Sale
vavada online casino: казино вавада – вавада рабочее зеркало
prawo jazdy kat t
vibration analysis
The Significance of Resonance Management Equipment in Industrial Equipment
Across production settings, equipment along with turning machinery are the foundation of operations. Yet, one of the highly widespread challenges which might obstruct the efficiency and longevity exists as oscillation. Vibration might cause a range of problems, ranging from decreased exactness as well as productivity resulting in greater damage, in the end bringing about pricey downtime along with repairs. Such a situation is the point where vibration regulation apparatus becomes vital.
The Reason Vibrations Mitigation proves Critical
Vibration within industrial equipment may cause multiple harmful impacts:
Minimized Functional Productivity: Excess oscillation could bring about discrepancies and distortion, lowering total performance of the devices. Such may bring about slower manufacturing speed as well as increased electricity usage.
Increased Erosion: Ongoing vibration hastens total erosion to equipment components, bringing about additional maintenance and a risk of unexpected failures. Such a scenario not only increases operating costs as well as decreases the durability in the machinery.
Safety Dangers: Excessive vibration might pose considerable security risks both to both the machines along with the personnel. In, serious conditions, it could bring about catastrophic equipment failure, threatening workers as well as bringing about considerable damage in the premises.
Precision and Quality Challenges: In sectors that depend on high accuracy, such as industrial sectors or aerospace, vibrations can cause inaccuracies during the production process, leading to flawed products along with increased waste.
Affordable Solutions to Vibration Regulation
Investing in vibration management equipment is not just a necessity and also a smart decision for any organization dependent on mechanical systems. The offered modern vibration control systems are built to remove vibrations from all machine and rotational systems, guaranteeing smooth along with efficient functioning.
Something that sets these systems from others is its cost-effectiveness. We understand the significance of keeping costs low in the current market, which is why we offer top-tier vibration management solutions at prices that are reasonable.
By choosing our systems, you’re not only securing your mechanical systems as well as improving its operational effectiveness you’re also putting resources towards the long-term performance of your operations.
Conclusion
Vibration management is a critical element in ensuring the efficiency, security, and lifespan of your machines. Through our affordable resonance mitigation apparatus, you can be certain your production function efficiently, all manufactured items are of high quality, and your employees stay safe. Don’t allow oscillation affect your operations—invest in the appropriate systems immediately.
penis enlargement
10 Things Everyone Hates About Fireplace Surround Fireplace Surround modern fireplace (http://Bitetheass.Com/)
15 Things Your Boss Wished You Knew About G Spot Vibrator g spot stimulators
15 Terms That Everyone Involved In Audi Spare Key Industry Should Know Audi tt key replacement – auto-locksmiths00493.pennywiki.com –
Who Is Responsible For The Upvc Windows Repair Budget?
Twelve Top Ways To Spend Your Money Repair Upvc Windows
Responsible For The Mini Chest Freezer Uk Budget? 12 Top Ways
To Spend Your Money Electriq Chest Freezer
Tips For Explaining Get Diagnosed With ADHD To Your
Boss Adult Adhd Diagnosis Near Me (Mental-Health-Assessment61568.Wikiexcerpt.Com)
How Much Do Door Repairs Near Me Experts Earn? service