<!doctype html>
<head>
<title>Mobile-Web-App: jQuert, .text() vs .html()</title>
<meta charset="utf-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var textin1 = $(".source").text();
var textin2 = $(".source").html();
$("#dest1").text(".text: <b>" + textin1 + "</b>");
$("#dest2").html(".html: <b>" + textin2 + "</b>");
});
</script>
</head>
<body>
<p><b>Mobile-Web-App: jQuert, .text() vs .html()</b></P>
<p class="source">Hello! </p>
<p class="source">Mobile</p>
<p class="source">-Web</p>
<p class="source">-App</p>
<p id="dest1"></p>
<p id="dest2"></p>
</body>
</html>
Tuesday, May 8, 2012
jQuery: .text() vs .html()
Monday, May 7, 2012
jQuery text(), get and set text
<!doctype html>
<head>
<title>Mobile-Web-App: jQuert text(), get and set text</title>
<meta charset="utf-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var textin = $(".source").text();
$("#dest").text(textin);
});
</script>
</head>
<body>
<p><b>Mobile-Web-App: jQuert text(), get and set text</b></P>
<p class="source">Hello! </p>
<p class="source">Mobile</p>
<p class="source">-Web</p>
<p class="source">-App</p>
<p id="dest">-App</p>
</body>
</html>
Related:
- jQuery: .text() vs .html()
jQuery vs Javascript get current time
<!doctype html>
<head>
<title>Mobile-Web-App: jQuery vs Javascript get current time</title>
<meta charset="utf-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var now_jQuery = $.now();
var now_Javascript = (new Date).getTime();
document.writeln("<p>jQuery - $.now() = " + now_jQuery + "</p>");
document.writeln("<p>Javascript - (new Date).getTime() = " + now_Javascript + "</p>");
});
</script>
</head>
<body>
</body>
</html>
Sunday, May 6, 2012
GoMoMeter: analyze the experience of mobile users on your site
This tool, GoMoMeter, shows you how your current site looks on a smartphone, and provides a free report with personalized recommendations tailored to how your business can build a more mobile-friendly experience.
Thursday, May 3, 2012
About Tizen
Tizen is an open source, standards-based software platform supported by leading mobile operators, device manufacturers, and silicon suppliers for multiple device categories, including smartphones, tablets, netbooks, in-vehicle infotainment devices, smart TVs, and more. Tizen offers an innovative operating system, applications, and a user experience that consumers can take from device to device.
The Tizen project resides within the Linux Foundation and is governed by a Technical Steering Group. The Technical Steering Group is the primary decision-making body for the open source project, with a focus on platform development and delivery, along with the formation of working groups to support device verticals.
The Tizen Association has been formed to guide the industry role of Tizen, including gathering of requirements, identification and facilitation of service models, and overall industry marketing and education.
Tizen provides a robust and flexible environment for application developers, based on HTML5. With HTML5's robust capabilities and cross platform flexibility, it is rapidly becoming the preferred development environment for mobile apps and services. The Tizen SDK and API allow developers to use HTML5 and related web technologies to write applications that run across multiple device segments.
The Tizen 1.0 Larkspur source code and SDK are now available.
The Tizen SDK is a comprehensive set of tools for developing Tizen Web applications. It consists of Web IDE, Emulator, toolchain, sample code, and documentation. Tizen SDK 1.0 Larkspur runs on Windows*, as well as Ubuntu*. Tizen Web applications may be developed without relying on an official Tizen IDE, as long as the application complies with Tizen packaging rules.
Wednesday, May 2, 2012
jQuery .extend() - merge objects
The jQuery .extend() method merge objects into a target object. The example below, object1 receives the properties of object2 and object3.
<!doctype html>
<head>
<title>Mobile-Web-App: jQuery.extend</title>
<meta charset="utf-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var object1 = {"prop_a": "Property A"};
var object2 = {"prop_b": 123.001};
var object3 = {"prop_c": object2};
document.writeln("<p><b>$.extend</b></p>");
document.writeln("<p>object1:</p>");
$.each(object1, function(i, val) {
document.writeln("<p>i: " + i + " / v: " + val + "</p>");
});
document.writeln("<p>object2:</p>");
$.each(object2, function(i, val) {
document.writeln("<p>i: " + i + " / v: " + val + "</p>");
});
document.writeln("<p>object3:</p>");
$.each(object3, function(i, val) {
document.writeln("<p>i: " + i + " / v: " + val + "</p>");
});
document.writeln("<p><b>$.extend(object1, object2, object3)</b></p>");
$.extend(object1, object2, object3);
document.writeln("<p>object1:</p>");
$.each(object1, function(i, val) {
document.writeln("<p>i: " + i + " / v: " + val + "</p>");
});
});
</script>
</head>
<body>
</body>
</html>
Tuesday, May 1, 2012
Javascript typeof() vs jQuery $.type()
<!doctype html>
<head>
<title>Mobile-Web-App: Javascript typeof() vs jQuery .type()</title>
<meta charset="utf-8">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var myArray = ["A", "B", "C"];
var myEmptyArray = [];
var myString = "ABCDEFG";
var myEmptyString = "";
var myInt = 1000.01;
var myNull = null;
document.writeln("<p><b>Javascript typeof()</b></p>");
document.writeln("<p>Array: " + typeof(myArray) + "</p>");
document.writeln("<p>Empty Array: " + typeof(myEmptyArray) + "</p>");
document.writeln("<p>String: " + typeof(myString) + "</p>");
document.writeln("<p>Empty String: " + typeof(myEmptyString) + "</p>");
document.writeln("<p>Int: " + typeof(myInt) + "</p>");
document.writeln("<p>null: " + typeof(myNull) + "</p>");
document.writeln("<p><b>jQuery .type()</b></p>");
document.writeln("<p>Array: " + $.type(myArray) + "</p>");
document.writeln("<p>Empty Array: " + $.type(myEmptyArray) + "</p>");
document.writeln("<p>String: " + $.type(myString) + "</p>");
document.writeln("<p>Empty String: " + $.type(myEmptyString) + "</p>");
document.writeln("<p>Int: " + $.type(myInt) + "</p>");
document.writeln("<p>null: " + $.type(myNull) + "</p>");
});
</script>
</head>
<body>
</body>
</html>
Subscribe to:
Posts (Atom)





