Archive for 'Script Src'

Absolute basic skeleton of a Sencha Touch project

Sencha Touch is the latest and most powerful of web app frameworks. Web apps are mobile applications that run on a web browser (just browse the URL) but, with the look, feel and functionality of a native app

There are many examples out there for Sencha Touch but, I couldn’t find one that explains the absolute basic outline of a Sencha Touch project. Here I will explain what the basic outline of a Sencha Touch project looks like:

index.html

It is always recommended not to embedded Javascript inline like this. Preferably, create a file called app.js and put the Javascript code in it. Include the js file in your HTML. So, finally you will end up with 2 files like this:
index.html

app.js

Adding tab bar button in Sencha

The following script adds tab bar buttons:

Incoming search terms:

  • sencha add tabbar to list
  • sencha touch how to add tab to tabbar

Child selector example in jQuery

jQuery makeArray function usage

The following example shows you how to use makeArray function:

Incoming search terms:

  • 2D makeArray jquery
  • jquery makearray() exemple

Simple image slide down effect using jQuery

jQuery’s slideDown() function is used to create slide down effect in the following example:

<html>
<head>
<style>
div { background:#ee0000; margin:3px; width:100px;
height:50px; display:none; float:left; }
</style>
<script src=”http://code.jquery.com/jquery-1.5.js”></script>
</head>
<body>
Click here to silde down
<div></div>
<div></div>
<div></div>
<script>
$(document.body).click(function () {
if ($(“div:first”).is(“:hidden”)) {
$(“div”).slideDown(“slow”);
} else {
$(“div”).hide();
}
});

</script>

</body>
</html>

Incoming search terms:

  • jquery image slidedown

jQuery inArray() usage

jQuery.inArray( value, array )

The jQuery inArray() function searches the given value is there in the array.

Example

jQuery(‘[attribute|="value"]‘)

attribute
An attribute name.
value
An attribute value. Quotes are mandatory.
Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).





Some text

Some other text