jQuery Mobile Plugin For Changing Text with One Click

File Size: 5.9KB
Views Total: 1039
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Mobile Plugin For Changing Text with One Click

Audero Text Changer is a jQuery and jQuery Mobile based plugin that enables to you change the text of your pages without breaking the enhancements made by the framework and without worrying about their type. Please check the demo page to see it in action.

How to use it:

1. Include jQuery library and jQuery Audero Text Changer on the page

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="../src/jquery.auderoTextChanger.min.js"></script>

2. Include jQuery mobile library and jQuery mobile CSS on the page

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.css" />
<script src="http://code.jquery.com/mobile/1.3.1/jquery.mobile-1.3.1.min.js"></script>

3. The HTML

<header data-role="header">
<h1 id="app-title">Audero Text Changer</h1>
</header>

<a id="change-text" href="#" data-role="button" data-theme="b">Click to change the text!</a>

4. The javascript

<script>
$(document).on(
   "pageinit",
   function()
   {
      $("#change-text").click(function() {
      $("#header").auderoTextChanger("A new header");
      });
   }
);
</script>

This awesome jQuery plugin is developed by AurelioDeRosa. For more Advanced Usages, please check the demo page or visit the official website.