Latest Entries »

Following are the below selectors,filters which are used in common in jquery.
Below selectors are specified with correspoding purposes.

detttach :Temporarily Removes from the DOM.
remove : Removes Peremanently from the DOM.
append: Attach any content.
parent :Travelse to it parent level object.
children :Travelse to its beneath objects
prev : Travelse to the Left side of the elements.
Ex:-
.previous() it moves to the

next : Travelse to the Right side of the elements.
Ex:-
.next() it moves to the

replaceWith :This will replace the content.
$(“.meat”).replaceWith(”

  • Hai
  • “);

    Filter:
    1)first
    2)last
    3)slice:-slice(1,3) This returns the second element.
    4)not:- Returns all the Elements which doesnt pocess that quality.
    5)eq: Equals.
    Ex:-$(“.fish).eq(1);
    This returns the first element of fish class.
    6)before():
    Append a tag before the tag.
    $(“.fish”).before(”

  • Handsome
  • “);
    This will result putting Handsome before the fish.
    7) after()
    Append a tag before the tag.
    $(“.fish”).after(”

  • Handsome
  • “);
    This will result putting Handsome after the fish.
    8)not
    It will result all the children whose heading are not h4.
    Ex:-
    $(“.left_col”).children().not(“h4″);
    9) Filter()

    DOM manipulation You can add to, replace, and remove things from the DOM at will:
    detach
    remove
    replaceWith
    before
    after

    Filters
    Filter methods help you narrow down a set of selected elements:
    first
    equal
    last
    slice
    filter
    not

    Fade effects
    Change the opacity property of CSS
    elements: fadeInfadeOut
    fadeTo

    Slide effects
    Change the height property of CSS
    elements:
    slideUp
    slideDownslideToggle

    animate
    Lets you create custom animations when out-of-theboxjQuery effects aren’t enough.
    Animates CSS properties over time. Only works with CSS properties that have numerical settings.
    Elements can be moved either absolutely or relatively.
    Operator combinations (=, +, -) make relative animation much easier.

    –JQueryObject–
    planeObject={
    engines:”4″,
    type:”passenger”,
    propellor: “No”};

    Now we can acess the elements like planeObject.engines.

    var myCountry = {
    getCapital : function() {
    alert(this.myCapital);
    },
    myName : ‘USA’,
    myCapital : ‘Washington DC’
    },

    Now we can access the object in this fashion.
    myCountry.getCapital()
    this will show the alert message.
    This is soemthing like Class.methodname();

    $.inArray(): For identifying the element in the Array.
    Ex:-
    var haystack = new Array(‘hay’, ‘mouse’, ‘needle’, ‘pitchfork’)
    Synatax:
    var index = $.inArray( value, array );
    Identfying needle in the haystack.
    var needle_index = $.inArray( ‘needle’, haystack );

    On from Jquery 1.7.

    Ex:-Surfing all the elements under accepmenu whose elements are a
    $(‘#accpmenu’).on(‘click’, ‘a’, function () {

    //this gets the index by finding the first parent list-item element and getting it’s index compared do its siblings
    var selected_index = $(this).parents(‘li’).index();
    alert(selected_index);
    });

    Hi All,

    Well its been a long time that i had written this app. But couldnt able to upload it :(

    App DEscription :

    The coding is done in a very basic level so that all beginners can easily get through it.

    This is the same Letters App which is built using the Flex,Just the Technology varys here i have replaced Flex with Jquery Mobile.

    Following things can be covered from this Post.

    1) Preparing Dynamic List by Loadin the XML.
    2) Navigation to Various Screens.
    3) Multiple Page Navigations.
    4) Loading Data Dynamically.
    5) Displaying Data in Lists.

    Click on Home.html for viewing this App.

    Please use Mozilla For viewing this App.

    http://www.2shared.com/file/_iMBTfoB/LettersApp.html

    Thanks,
    Shyam

    This took me around huge time to do this, As i am a newbie to this complex Framework.
    Sencha Touch is used for developing dynamic HTML Mobile Apps.
    Even JQueryMobile does the same.

    Later i will let you know the difference between JQueryMobile, Sencha.

    Following Example demonstrates Populating the XML data into List.

     

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″>
    <meta name=”viewport” initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=0;” />
    <link rel=”stylesheet” href=”../../resources/css/sencha-touch.css” type=”text/css”>

    <title>List</title>
    <script type=”text/javascript” src=”../../sencha-touch.js”></script>
    <!– <script type=”text/javascript” src=”xmltojson.js”></script>

    <script type=”text/javascript” src=”x2j.js”></script>–>

    <!– <script type=”text/javascript” src=”src/index.js”></script> –>
    <script type=”text/javascript” src=”jquery-1.7.1.min.js”></script>
    </head>

    <script type=”text/javascript”>

    Ext.setup({
    onReady: function() {
    Ext.regModel(‘Person’, {
    fields: [
    {name: 'ename', type: 'string'}

    ]
    });

    /* var itemTemplate = new Ext.XTemplate(
    ‘<tpl for=”.”>’,
    ‘{ename}’,
    ‘</tpl>’);*/

    var xmlStore = new Ext.data.Store({
    model: “Person”,
    proxy: {
    type: ‘ajax’,
    url: ‘BirthdayInvitations.xml’,
    reader: {
    type: ‘xml’,
    record: ‘bdayevent’
    }
    },
    root: ‘bdayevents’,
    autoLoad: true
    });

    var templist = new Ext.List( {
    title:”xmli”,
    itemTpl : ‘{ename}’,

    floating: true,
    indexBar: true,
    width: 350,
    height: 370,
    centered: true,
    store:xmlStore,
    modal: true,
    hideOnMaskTap: false
    }).show();

    var panel = new Ext.TabPanel({
    tabBar: {
    layout: {
    pack: ‘center’
    }
    },
    fullscreen: true,
    cardSwitchAnimation: ‘slide’,
    items: [templist]
    });
    }
    });
    </script>

    </head>
    <body></body>
    </html>

    For your Info:

    regModel: This is Like DAO of the Elements that we are Loading.

    Titanium Mobile Vs Sencha.

    http://savagelook.com/blog/portfolio/a-deeper-look-at-appcelerator-and-phonegap

    Here’s where Titanium Mobile wins :

    Titanium is open source and free. Sencha touch follows dual licensing model like extJS, i.e. it is open source, but if you use it for commercial purpose, you need to buy their license.
    Titanium builds native apps. So you have access to almost every feature in the phone, like say reading phone contacts, accessing accelerometer, GPS etc. Sencha will work inside the phone browser . ALthough it can be made to work as a pseudo-app by embedding it inside a webview of an app made using Titanium/Cocoa. I suppose it can access GPS coordinates to some extent with the users authorization, but I am not sure about it. Also Titanium will support (in near future) running the app in the background and PUSH notifications which cannot be done using Sencha as it runs inside the browser.
    When an app made using sencha loads , it has to load the framework first and then the content. So it will be a little slower in terms of loading time compared to Titanium built apps as it has to download the 300 KB sencha framework and the images for the buttons. Although the download process can be bypassed (Thanks to James Hughes for pointing it out) by including the framework in the Phonegap or Titanium resources folder, the javascript parsing time taken by the webview might become noticeable at the user’s end. On the iPhone simulator, it takes around 2-3 seconds for the sencha’s simple Nested list example to parse and display even when the Sencha framework is store along with the app.
    Sencha touch runs in the any simulator, be in iPhone, android or blackberry. You do not need any kind of separate sencha touch simulator as such. Hence Sencha touch has its own set of advantages, namely :

    Sencha gives more control in making changes to your UI after the app is published. Since all the code is getting loaded fresh from the server each time the user accesses, you can virtually modify the entire app without the user’s knowledge. But when it comes to a native app built using Titanium, the changes have to go through apple’s review process and the user must manually update the app. In short Sencha requires a lesser turnaround time when it comes to bugs/updates.
    Sencha works on almost all webkit based browsers which includes chrome, safari and opera. So you can be sure that it displays the same UI in iPhone,Android,Blackberry,iPad and also desktop browsers. So once IE and firefox fully supports HTML5, then you can have a single code which will work on all desktop browsers and all mobile devices uniformly. Titanium apps make use of native controls. So it gives a different UI on different devices and are currently limited to iPhone,iPad and Android devices (Blackberry devices soon)
    Although both the frameworks use simple Javascript syntax , the choice of the framework will depend on the project under consideration. If the app just makes HTTP requests to some servers to fetch the results, then sencha touch should be good enough. But if there are plans of improving the app later on to make full use of the phones features like running the app in the background , accessing GPS data continuously , sending PUSH notifications, stream music & videos, write to Files & Databases etc then Titanium should be used. But a perfect mashup between them is what developers look out for.

    Titanium too does not come without limitations. After playing around with titanium sdk 1.4 , I have realized that the guys over at appcelerator care more about the iPhone than android. Titanium android sdk does not support many of the functions provided in iPhone. Some of the most common ones are : Phone contacts, Animations, Horizontal Layout etc. Also the nature of android platforms limits the framework from providing some functions like WIndow transitions, webview for reading pdf,doc etc. I will keep adding more revelations about Titanium as I come across them. Cya later.

    Hi All,

    I know well its how difficult to play with JQuery mobile and generate the Dynamic Lists.

    I had made it feasible withe below snippet of code.

    function init()
    {
    type: “GET”,
    $.ajax({
    url: “BirthdayInvitations.xml”,
    dataType: “xml”,
    success: function ParseXml(xml)
    {
    //var $ul = $(#
    //var $ul = $(”

      “).data(“role”, “listview”);
      $(xml).find(“event”).each(function() {
      $(“#mylist”).append(‘

    • ‘ +this.textContent + ‘
    • ‘);
      });
      $(“#mylist”).listview(‘refresh’);
      }});

      }

      If any queries do post your comments.

      Hi All,

      These are the following list of best Android Apps Available in Andorid Market.

      Wifi Lock
      Easy Installer
      Memory Booster
      MyBackup
      History Eraser
      System App
      Android Optimizer
      Andguard
      Smart Bar
      Fast reboot
      Free Memory
      Free Advanced Task Manager
      Widget Doid.
      Multi Icon

      Hi All,

      Might You People have been bored enough using Apps on Tablets | Mobiles even me too. So how about devloping Apps | Games controlling your SmartTVs|Laptops with your mobiles ?.
      (Seems to be exciting right)..

      Wait for my next Post which tells how you can achieve this.

      Hey all wait for my upcoming version of Letters App 2.0 with more exciting features.

      Catch me @shyamshyre on Twitter for more updates.

      Happy Day.
      Shyam.S

      Hi All,

      Download the Android Letters App where youccan quickly edit letters of various categories and email/sms to various recipents instantly.

      You can download the App from below url.

      http://www.2shared.com/file/RRfhIEBO/InvitationApp.html

      Happy Android.
      Shyam

      Follow

      Get every new post delivered to your Inbox.