Showing posts with label Javascript. Show all posts
Showing posts with label Javascript. Show all posts

Wednesday, November 29, 2017

jQuery Mobile Cordova Tutorial

This is also a very nice videos to follow

If you working cordova + jQuery mobile

video 1
https://www.youtube.com/watch?v=rW0Trnx7Yjo

video 2
https://www.youtube.com/watch?v=3IMXNeAfYy8#t=6.79006



video 3
https://www.youtube.com/watch?v=C6PuxKxsus4#t=6.79006

ThemeRoller JQuery

I found this JQuery Mobile ThemRoller very useful

https://themeroller.jquerymobile.com/

You can try it.

I'm trying this for my cordova app template

JQuery Mobile for Cordova and Other hybrid framework

Playlists

This is a helpful guide from a guy in YouTube who created steps by step using JQuery Mobile. Thumbs up!! :)

https://www.youtube.com/watch?v=bsthKhTHguI&list=PLccPlNFtq5uEMHqMTibKLtidwahHmCgRc


jQuery Mobile Lesson 1 - Setting up pages

https://www.youtube.com/watch?v=bsthKhTHguI
jQuery Mobile Lesson 2 - Linking pages

https://www.youtube.com/watch?v=-IkjcER0lyU
jQuery Mobile Lesson 3 - Data Transitions

https://www.youtube.com/watch?v=fNPcXOeMRh8
jQuery Mobile Lesson 5 - Navigation, icons and collapsibles

https://www.youtube.com/watch?v=FwNJ7mtuilM

JS Mustache IF/Else

This how you set if/else in JS Mustache

test_template.mustache

//If the lists is not empty

#lists

//not empty

/lists


//Else if lists is empty

^lists

//empty

/lists

 $.get('test_template.mustache', function(template) 
var rendered = Mustache.render(template, lists: data);
$('#target').html(rendered);
);

More documentation here about JS Mustache https://github.com/janl/mustache.js/

JQuery oop blueprint basic

While working on JQuery Class I realize I need to document this code blueprint for the future purposes, just in case I'm lost :)

test_class.js

var TestClass = function($) 
'use strict';

var self = this;

//method that is bind with (self / this) is callable outside the class
self.test = function()
      console.log("This is a test");


//another public method to bind all events, click, change etc..
self.bindAll = function()

;

//private method
var privateTest = function()

;

;



Instantiate the class then call the method test
$(document).ready(function() 
var TestClassObj = new TestClass($);
TestClassObj.test();
TestClassObj.bindAll();
);

Feel free to comment below and correct me if wrong or miss something. Thanks :)
 

blogger templates | Make Money Online