SlideShare a Scribd company logo
Presented by your friends atPresented by your friends at
Responsive JavascriptResponsive Javascript
in Drupal Sitesin Drupal Sites
About MeAbout Me
CEO of Trellon
on drupal.org@techsoldaten
Chief Internet Strategist
for Trellon
One of the first Drupal firms in North America
10+ years architecting large scale Drupal
environments
Passionate about scalability, third-party
integration, contributions
Responsive Javascript in Drupal Sites
Responsive JavascriptResponsive Javascript
Responsive Javascript in Drupal Sites
Scripts that run:
In specific browser dimensions
On devices with specific capabilities
Can be activated / removed in response to changes
in device dimensions, including rotation
There's No One WayThere's No One Way
Responsive Javascript in Drupal Sites
Popular solutions. Each has benefits and drawbacks:
jQuery Mobile
jQuery Factories
Conditional javascript with @media
Just using display: none and duplicating the markup
with a different selector
Why is This a DrupalWhy is This a Drupal
Problem?Problem?
Responsive Javascript in Drupal Sites
Drupal has a lot of things that don't respond well to mobile.
CKEditor: Try using this on mobile
Views Slideshow: No destroy method
Breakpoints: No integration outside theme
Recipe for ResponsiveRecipe for Responsive
JavascriptJavascript
Responsive Javascript in Drupal Sites
jRespond
Define breakpoints in theme
Views
Just views, no slideshows
jRespondjRespond
Allows you to set breakpoints
Responsive Javascript in Drupal Sites
<script>
// adds breakpoints used by javascript
var jRes = jRespond([
{
label: 'handheld',
enter: 0,
exit: 640
},{
label: 'tablet',
enter: 768,
exit: 979
},{
label: 'desktop',
enter: 1200,
exit: 10000
}
]);
</script>
jRespondjRespond
Allows you to set breakpoints
Responsive Javascript in Drupal Sites
<script>
jRes.addFunc({
breakpoint: 'handheld',
enter: function() {
// turns on slideshows
nav = showSlideshow('#slideshow');
},
});
function showSlideshow(item){
item.cycle();
}
</script>
Structured around functions
that fire when dimensions
change (instead of user
activity)
jRespondjRespond
Allows you to set breakpoints
Responsive Javascript in Drupal Sites
<script>
jRes.addFunc({
breakpoint: 'handheld',
enter: function() {
// turns on slideshows
nav = showSlideshow('#slideshow');
},
// here's my exit function
exit: function() {
// removes slideshows
'#slideshow'.cycle('destroy');
},
});
function showSlideshow(item){
item.cycle();
}
</script>
Code executes when users
enter and exit
Structured around functions
that fire when dimensions
change (instead of user
activity)
ViewsViews
Instead of using a Views plug in to generate something,
use responsive jQuery
Responsive Javascript in Drupal Sites
ExamplesExamples
Let's look at some sitesLet's look at some sites
Questions?
Thank you!
https://github.com/ten1seven/jRespond
heytrellon@trellon.com
twitter.com/trellon

More Related Content

PPTX
Website Development Roles
PDF
Simplifying the Drupal Admin Experience
PPTX
Extend Drupal with a CRM, DrupalGov 2013
ODP
Drupal business applications
PDF
Drupal as open business software solution
PPT
Extending CRM Core
ODP
Erpal Platform - Preview of the Drupal business application framework
PDF
Drupal security best practices
Website Development Roles
Simplifying the Drupal Admin Experience
Extend Drupal with a CRM, DrupalGov 2013
Drupal business applications
Drupal as open business software solution
Extending CRM Core
Erpal Platform - Preview of the Drupal business application framework
Drupal security best practices

Similar to Responsive Javascript (20)

PDF
Responsive & Ready: Why Drupal 8 is Ideal for Building Mobile-first Experienc...
PDF
Building mobile applications with DrupalGap
PPTX
Building Responsive Websites with Drupal
PDF
Drupal for Mobile
PDF
Drupal 8 mobile initiative
PPT
Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study
PPTX
Power your mobile app with Drupal - Melbourne Mobile, July 2013
PDF
Getting Started with DrupalGap
PDF
Responsive Web Design
PPTX
Drupal as a data server
ODP
Presentation
KEY
Building Responsive Websites and Apps with Drupal
PPTX
Drupalcon Asia - "Drupal 8 Mobile in its DNA"
PDF
Drupal is not your Website
KEY
Drupal & Mobile
PDF
Drupal & javascript
PPT
DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)
KEY
For a Social Local and Mobile Drupal
PDF
Responsive Web Design for Drupal, CMS Expo
PDF
Bringing Interactivity to Your Drupal Site with Node.js Integration
Responsive & Ready: Why Drupal 8 is Ideal for Building Mobile-first Experienc...
Building mobile applications with DrupalGap
Building Responsive Websites with Drupal
Drupal for Mobile
Drupal 8 mobile initiative
Mobile Interface to CMS Based On HTML5 and Drupal: A Case Study
Power your mobile app with Drupal - Melbourne Mobile, July 2013
Getting Started with DrupalGap
Responsive Web Design
Drupal as a data server
Presentation
Building Responsive Websites and Apps with Drupal
Drupalcon Asia - "Drupal 8 Mobile in its DNA"
Drupal is not your Website
Drupal & Mobile
Drupal & javascript
DrupalCon Chicago 2011 ReportBack (11/03/30 - G. Bedford)
For a Social Local and Mobile Drupal
Responsive Web Design for Drupal, CMS Expo
Bringing Interactivity to Your Drupal Site with Node.js Integration
Ad

Recently uploaded (20)

PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Machine learning based COVID-19 study performance prediction
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
Machine Learning_overview_presentation.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
Mobile App Security Testing_ A Comprehensive Guide.pdf
Review of recent advances in non-invasive hemoglobin estimation
Advanced methodologies resolving dimensionality complications for autism neur...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)
Assigned Numbers - 2025 - Bluetooth® Document
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Machine learning based COVID-19 study performance prediction
sap open course for s4hana steps from ECC to s4
Machine Learning_overview_presentation.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Ad

Responsive Javascript

  • 1. Presented by your friends atPresented by your friends at Responsive JavascriptResponsive Javascript in Drupal Sitesin Drupal Sites
  • 2. About MeAbout Me CEO of Trellon on drupal.org@techsoldaten Chief Internet Strategist for Trellon One of the first Drupal firms in North America 10+ years architecting large scale Drupal environments Passionate about scalability, third-party integration, contributions Responsive Javascript in Drupal Sites
  • 3. Responsive JavascriptResponsive Javascript Responsive Javascript in Drupal Sites Scripts that run: In specific browser dimensions On devices with specific capabilities Can be activated / removed in response to changes in device dimensions, including rotation
  • 4. There's No One WayThere's No One Way Responsive Javascript in Drupal Sites Popular solutions. Each has benefits and drawbacks: jQuery Mobile jQuery Factories Conditional javascript with @media Just using display: none and duplicating the markup with a different selector
  • 5. Why is This a DrupalWhy is This a Drupal Problem?Problem? Responsive Javascript in Drupal Sites Drupal has a lot of things that don't respond well to mobile. CKEditor: Try using this on mobile Views Slideshow: No destroy method Breakpoints: No integration outside theme
  • 6. Recipe for ResponsiveRecipe for Responsive JavascriptJavascript Responsive Javascript in Drupal Sites jRespond Define breakpoints in theme Views Just views, no slideshows
  • 7. jRespondjRespond Allows you to set breakpoints Responsive Javascript in Drupal Sites <script> // adds breakpoints used by javascript var jRes = jRespond([ { label: 'handheld', enter: 0, exit: 640 },{ label: 'tablet', enter: 768, exit: 979 },{ label: 'desktop', enter: 1200, exit: 10000 } ]); </script>
  • 8. jRespondjRespond Allows you to set breakpoints Responsive Javascript in Drupal Sites <script> jRes.addFunc({ breakpoint: 'handheld', enter: function() { // turns on slideshows nav = showSlideshow('#slideshow'); }, }); function showSlideshow(item){ item.cycle(); } </script> Structured around functions that fire when dimensions change (instead of user activity)
  • 9. jRespondjRespond Allows you to set breakpoints Responsive Javascript in Drupal Sites <script> jRes.addFunc({ breakpoint: 'handheld', enter: function() { // turns on slideshows nav = showSlideshow('#slideshow'); }, // here's my exit function exit: function() { // removes slideshows '#slideshow'.cycle('destroy'); }, }); function showSlideshow(item){ item.cycle(); } </script> Code executes when users enter and exit Structured around functions that fire when dimensions change (instead of user activity)
  • 10. ViewsViews Instead of using a Views plug in to generate something, use responsive jQuery Responsive Javascript in Drupal Sites
  • 11. ExamplesExamples Let's look at some sitesLet's look at some sites