1 //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
2 //>>description: Add markup for labels
6 define( [ ], function ( ) {
7 //>>excludeEnd("jqmBuildExclude");
11 * This software is licensed under the MIT licence (as defined by the OSI at
12 * http://www.opensource.org/licenses/mit-license.php)
14 * ***************************************************************************
15 * Copyright (C) 2011 by Intel Corporation Ltd.
17 * Permission is hereby granted, free of charge, to any person obtaining a
18 * copy of this software and associated documentation files (the "Software"),
19 * to deal in the Software without restriction, including without limitation
20 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
21 * and/or sell copies of the Software, and to permit persons to whom the
22 * Software is furnished to do so, subject to the following conditions:
24 * The above copyright notice and this permission notice shall be included in
25 * all copies or substantial portions of the Software.
27 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
32 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
33 * DEALINGS IN THE SOFTWARE.
34 * ***************************************************************************
37 // Add markup for labels
40 (function($, undefined) {
42 $(document).bind("pagecreate create", function(e) {
43 $(":jqmData(role='label')", e.target).not(":jqmData(role='none'), :jqmData(role='nojs')").each(function() {
44 $(this).addClass("jquery-mobile-ui-label")
45 .html($("<span>", {"class": "jquery-mobile-ui-label-text"}).text($(this).text()));
51 //>>excludeStart("jqmBuildExclude", pragmas.jqmBuildExclude);
53 //>>excludeEnd("jqmBuildExclude");