Wrap long text in span

Description

The following code shows how to wrap long text in span.

Example


<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<link rel="stylesheet" type="text/css"
  href="http://jquerymobile.com/demos/1.2.0/css/themes/default/jquery.mobile-1.2.0.css">
<script type='text/javascript'
  src="http://jquerymobile.com/demos/1.2.0/js/jquery.mobile-1.2.0.js"></script>
</head><!--   w  ww  .  ja v  a2  s . com-->
<body>
  <div data-role="page" class="type-home">
    <div data-role="content">
      <a href="#popupInfo" data-rel="popup" data-role="button"
        data-inline="true">This is an exceptionally long span ...</a>
      <div data-role="popup" id="popupInfo" class="ui-content"
        data-theme="e" style="max-width: 350px;">
        <p>This is an exceptionally long span. 
        This is an exceptionally long span. 
        This is an exceptionally long span. 
        This is an exceptionally long span. 
        This is an exceptionally long span. 
        This is an exceptionally long span. 
        This is an exceptionally long span. 
        This is an exceptionally long span. 
        This is an exceptionally long span. 
        </p>
      </div>
    </div>
  </div>
</body>
</html>

Click to view the demo





















Home »
  jQuery Mobile »
    Example »




Button
Button Event
Button Icon
Button Text
Checkbox
Collapsible
Date
Dialog
Event
Footer
Form
Header
Icon
Input
Layout
Listview
Listview Divider
Listview Item
Loader
mobile_settings
Navbar
Page
Page Event
Popup
Radio
Select
Slider
Switch
Textarea
Theme