Adobe
產品
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
更多產品
解決方案
數位行銷
數位媒體
教育機構
金融服務業
政府機關
網頁體驗管理
更多解決方案
教學 說明 下載 公司
購買
家庭使用 適用於個人和家庭辦公室
授權方案 適用於企業、學校和政府機關
其他購買方式
搜尋
 
資訊 登入
歡迎, 我的購物車 我的貨品 我的客戶支援
我的帳戶
登出
為何要登入?登入即可管理您的帳戶並取得試用下載、產品擴充功能、社群討論區等。
Adobe
產品 產業 購買   搜尋  
解決方案 公司
說明 學習資源
登入 登出 我的貨品 我的客戶支援
Date Date
Qty:
Subtotal
Checkout
開發人員中心 / Dreamweaver 開發人員中心 /

Responsive design with jQuery marquee

作者 Chris Converse

Chris Converse
  • Codify Design Studio

Content

  • Overview: jQuery + Dreamweaver
  • Custom jQuery Scripts
  • Dynamic Loading Based on Screen Size
  • Watch the video: Using the custom template
  • Preview and download the template

Created

12 December 2011

頁面工具

在 Facebook 上共用
在 Twitter 上共用
在 LinkedIn 上共用
書籤
列印

Tags

系統需求

必須具備的知識

Previous experience working with Dreamweaver and setting up a local host server is recommended. Prior knowledge of HTML5 and JavaScript code is also required.

使用者等級

全部

要求的產品

  • Dreamweaver (Download trial)

範例檔案

  • template_13.zip

This template design combines both responsive design techniques coupled with a self-running jQuery promotional marquee. The unique challenge this template solves is that it uses jQuery’s Ajax feature to load additional interactive data into the template based on the user’s screen size. Combined with CSS3 media queries, this template offers a compelling user experience across devices, while maintaining a shared set of HTML and CSS markup.

  • Overview: jQuery + Dreamweaver
  • Watch the video: Using the custom template
  • Preview and download the template

Note: For more information on CSS-only responsive design template and a starter template, see Customizable starter design for multiscreen development.

Overview: jQuery + Dreamweaver

One of the great new features of Dreamweaver CS5.5 is the built-in support of jQuery. Whether you are just getting started with jQuery, or are a seasoned JavaScript developer, Dreamweaver's code completion and built-in references for jQuery are sure to increase your productivity (see Figure 1). In addition to jQuery support, Dreamweaver CS5.5 also features robust support for CSS3 media queries, making Multiscreen − or Responsive Design − a snap to set up.

Figure 1 Dreamweaver has code completion for jQuery statements
Figure 1. Dreamweaver has code completion for jQuery statements.

Custom jQuery Scripts

This template features a custom script we developed at Codify Design Studio that allows you to create an interactive homepage marquee, automatically populated and animated based on standard HTML loaded into your web page. The marquee consists of a series of panels, or slides, that contain an image, caption, and links between the panels. The panels and navigation are dynamically constructed based on the HTML content in the marquee_panels.html file (see Figure 2). There is also an autoplay feature built-in, so the marquee will advance on it’s own; however, when a user moves their mouse inside, the autoplay is disabled to allow interaction with the marquee.

Figure 2 Panels and navigation are dynamically constructed based on HTML content
Figure 2. Panels and navigation are dynamically constructed based on HTML content.

Note: Special thanks to Dimas Begunoff for giving us permission to include his jQuery Image Preloader plug-in.

Dynamic Loading Based on Screen Size

When the viewport width is wider than 550 pixels, we load the HTML page containing all of the marquee panels, preload the images, then start the interactive marquee. When this design is accessed by a device with a viewport less than 550 pixels wide, we hide the marquee container div, and load an HTML file containing only a single promotion (see Figure 3). This technique significantly lessens the load on smaller screens, while still maintaining all of the advantages of CSS3 media queries.

Note to Chrome users: At the time of this article, Chrome disabled Ajax loading of local files from your operating system. This will result in a blank area where the marquee/promo area should be loaded. Chrome supports this feature when your file is served from a web server, or from a locally running web service. Read more at the Chromium open source browser project.

Figure 3. An HTML file is loaded based on the viewport jQuery returns.
Figure 3. An HTML file is loaded based on the viewport jQuery returns.

In addition to HTML, CSS, and jQuery, this template comes with a pre-sliced Photoshop file, allowing you to customize the design elements of the template to match your organization's branding requirements.

Watch the video: Using the custom template

Chris Converse shows you how to use the Dreamweaver jQuery marquee template to load interactive data based on screen size. Combined with CSS3 media queries, the jQuery Ajax feature creates a compelling user experience across devices, while maintaining a shared set of HTML and CSS markup.

Preview and download the template

Preview how responsive marquee appears on different devices. Download the HTML, CSS, and source Photoshop files related to this template.

Figure 4 Preview how responsive marquee appears on different devices
Figure 4. Preview how responsive marquee appears on different devices

More Like This

  • Tableless layouts with Dreamweaver CS4
  • Adding video to a web page
  • Working with images in Dreamweaver CS4
  • Creating a simple three-column design
  • From table-based to tableless web design with CSS – Part 1: CSS Basics
  • Code editing in Dreamweaver
  • Understanding inheritance
  • Simple styling with CSS
  • Best practices with CSS in Dreamweaver CS4
  • Taking a Fireworks comp to a CSS-based layout in Dreamweaver – Part 1: Initial design

產品

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • 行動應用程式
  • Photoshop
  • Touch Apps

解決方案

  • 數位行銷
  • 數位媒體
  • 網頁體驗管理

產業

  • 教育機構
  • 金融服務業
  • 政府機關

說明

  • 產品說明中心
  • 訂購與退貨
  • 下載與安裝
  • 我的 Adobe

學習資源

  • Adobe Developer Connection
  • Adobe TV
  • 培訓與認證
  • 論壇
  • 設計中心

購買方式

  • 適用於個人和家庭辦公室
  • 授權方案
  • 其他購買方式

下載

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

公司

  • 新聞室
  • 合作夥伴方案
  • 企業社會責任
  • 工作機會
  • 投資者關係
  • 事件
  • 法律聲明
  • 安全性
  • 聯絡 Adobe
選擇您所在的國家/地區 台灣 (變更)
選擇您所在的國家/地區 關閉

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

使用條款 | 隱私權政策和 Cookies (更新)