Real-time Chat Blog

HTML5 Mobile Chat Easily with jQuery

2 min readPubNub Staff on Mar 14, 2012
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

Good News! We've launched an all new Chat Resource Center. We recommend checking out our new Chat Resource Center, which includes overviews, tutorials, and design patterns for building and deploying m...

Waving Hand

Good News! We’ve launched an all new Chat Resource Center.

We recommend checking out our new Chat Resource Center, which includes overviews, tutorials, and design patterns for building and deploying mobile and web chat.

Take me to the Chat Resource Center →

Get started quickly with your mobile app development with jQuery Mobile and PubNub. In just 125 HTML+CSS+JavaScript lines of code, I wrote this mobile chat app in under an hour. It was so easy to take advantage of the UI Components of jQuery Mobile and bind them into the Publish and Subscribe PubNub APIs. All the code you need is available on our GitHub Repository. Want to see it in action?

Check out the live HTML5 mobile chat demo here:
HTML5 Mobile Chat Easily with jQuery

HTML5 Mobile Chat + jQuery

Only the basic jQuery functions were used to get this app into action such as bind(), click() and scrollTop(). Then we used the PubNub publish() and subscribe() functions to allow cross-phone communication. The rest was simple because PubNub provides a reliable mobile connection between iPhones/Android devices and jQuery take care of the UI joy.

You’ll first need to sign up for a PubNub account. Once you sign up, you can get your unique PubNub keys in the PubNub Developer Portal.

More from PubNub

Can Empathy Exist in the Metaverse
News May 16, 20221 min read

Can Empathy Exist in the Metaverse

A roundtable discussion led by PubNub’s COO, Casey Clegg, exploring the topics of what it means to be human in a virtual world.

PubNub Staff

PubNub Staff

How to Advance Telehealth and Virtual Care Technologies
News May 2, 20221 min read

How to Advance Telehealth and Virtual Care Technologies

Dr. Joe Kvedar, Chair of the Board for the American Telemedicine Association, joins our COO, Casey Clegg, to discuss why...

PubNub Staff

PubNub Staff

Another Step Towards Data Security: ISO-27001 Implementation
BuildMay 2, 20221 min read

Another Step Towards Data Security: ISO-27001 Implementation

Today, we are glad to announce that we are currently in the process of implementing ISO-27001 security standards.

PubNub Staff

PubNub Staff