Jeff Batt eLearning Brothers Product Development Manager B.Y.O.L.: Titanium - Create Mobile Training as a Native App Using Javascript Jeff Batt eLearning.

Slides:



Advertisements
Similar presentations
KompoZer. This is what KompoZer will look like with a blank document open. As you can see, there are a lot of icons for beginning users. But don't be.
Advertisements

X-Media V2.0 Healthcare Training Jayex Technology Limited X-Media V2.0 March 2010 v
Who are these guys? Bruce Pulley Senior Mobile Applications Developer Andrew Rumbley Senior.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t PowerPoint Project 4 Modifying Visual Elements and Presentation Formats.
Microsoft Windows Vista Chapter 5 Personalize Your Work Environment.
COMPREHENSIVE Windows Tutorial 3 Personalizing Your Windows Environment.
Introduction to PowerPoint
Dreamweaver CS4 Concepts and Techniques Chapter 8 Media Objects.
FUNCTIONAL ASPECTS OF GREAT NATIVE MOBILE APPS
FIRST COURSE PowerPoint. XP New Perspectives on Microsoft Office 2007: Windows XP Edition2 What Is PowerPoint? PowerPoint is a powerful presentation graphics.
Using the File Manager WebCT 6. Understanding File Manager The File Manager is the area where all course files are stored. Whenever you link a file in.
IWebFolio Using a Template Tutorial Images in this tutorial:
Chapter 5 Using Business Information Sets
Chapter 19 – Macromedia Dreamweaver MX 2004
Getting Started with Adobe Dreamweaver CS6. Unit Objectives Define web design software Start Adobe Dreamweaver CS6 View the Dreamweaver workspace Work.
Building and managing class pages on our new Web site School Wires Training.
Jeff Batt eLearning Brothers Product Development Manager B.Y.O.L.: Titanium - Create Mobile Training as a Native App Using Javascript Jeff Batt eLearning.
Copyright © Texas Education Agency, All rights reserved. 1 Web Technologies Website Development with Dreamweaver.
© Ms. Masihi.  The Dreamweaver Welcome Screen first opens when you start Dreamweaver.  This screen gives you quick access to previously opened files,
Web Technologies Website Development Trade & Industrial Education
B.Y.O.L.: Adobe Edge Animate—Flash-like Interactions for HTML5 Devices Jeff Batt eLearning Brothers Product Development Manager.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 4 1 Microsoft Office FrontPage 2003 Tutorial 4 – Using Shared Borders and Themes.
1 Macromedia Dreamweaver Outline Introduction Macromedia Dreamweaver Text Styles Images and Links Symbols and Lines Tables Forms Scripting in Dreamweaver.
Website Development with Dreamweaver
Copyright © 2012 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin TECHNOLOGY PLUG-IN T8 DECISION MAKING USING ACCESS.
Microsoft Windows Vista Chapter 1 Fundamentals of Using Microsoft Windows Vista.
Introduction to MS WORD.
B.Y.O.L.: Building jQuery Mobile Apps in DreamWeaver Jeff Batt eLearning Brothers Product Development Manager.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
AgileZoom 1.3 interactive portfolios you can share Getting Started (swipe left to advance)
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
Moodle with Style Integrating new technologies to empower learning and transform leadership.
XP Practical OpenOffice.org Chapter 8 1 Creating a Presentation.
Chapter 5 Quick Links Slide 2 Performance Objectives Understanding Framesets and Frames Creating Framesets and Frames Selecting Framesets and Frames Using.
USING WORDPRESS TO CREATE A WEBSITE (RATHER THAN A BLOG) STEP-BY-STEP INSTRUCTIONS.
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 3.1 Test-Driving the Welcome Application 3.2.
CSD 340 (Blum)1 Using Visual Studio CSD 340 (Blum)2 Start/Microsoft Visual Studio 2005/Microsoft Visual Studio 2005.
VISTA IMAGING RADIOLOGY VIEWER. 2 The focus of this document is on the VistA Imaging Display Radiology Viewer. Other Display changes will be discussed.
Chapter 2 – Introduction to the Visual Studio .NET IDE
Creating a Simple Game in Scratch Barb Ericson Georgia Tech June 2008.
Pasewark & Pasewark 1 Access Lesson 5 Creating and Modifying Reports Microsoft Office 2007: Introductory.
By: Ms. Abeer Helwa 1. CREATE A WORD DOCUMENT 2 Blank document Templates To create a new blank document: click the File tab and click Blank document.
Using NativeScript to develop native apps for IOS and Android
Adding a wave file to a slide Adding a wave file to a slide (1 of 7) 1. Click on Insert. 2. Click Movies and Sounds. 3. Click Sound from file
Microsoft Expression Web-Illustrated Unit F: Enhancing a Design with CSS.
HTML Overview Part 5 – JavaScript 1. Scripts 2  Scripts are used to add dynamic content to a web page.  Scripts consist of a list of commands that execute.
 2002 Prentice Hall. All rights reserved. 1 Chapter 2 – Introduction to the Visual Studio.NET IDE Outline 2.1Introduction 2.2Visual Studio.NET Integrated.
McGraw-Hill/Irwin © The McGraw-Hill Companies, All Rights Reserved TECHNOLOGY PLUG-IN T8 Decision Making Using Access.
BBT 10 Visual Basic 03 Enrichment. Tip Before creating any files for your project, first create a new folder Save all of your files in the folder Pieces.
Powerpoint for Students What is Powerpoint?  Presentation software  Slides  Graphics  Animations for text  Animations for slides  Sound effects.
B.Y.O.L.: Adobe Edge Animate—Flash-like Interactions for HTML5 Devices Jeff Batt eLearning Brothers Product Development Manager.
Creating Web Pages with Links, Images, and Embedded Style Sheets
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
CNIT 133 Interactive Web Pags – JavaScript and AJAX Popup Boxes.
Adding Interactivity Comp 140 Fall Web 2.0 Major change in internet usage –From mostly static pages Text Graphics Simple links –To new paradigm.
 2002 Prentice Hall. All rights reserved. 1 Introduction to the Visual Studio.NET IDE Outline Introduction Visual Studio.NET Integrated Development Environment.
1. Explore Interactive GIS 2. Create Map Layouts 3. Reuse a Custom Map Layout 4. Create a Custom Map Template 5. Add a Report to a Layout 6. Add a Graph.
1 Chapter 15 Creating a Presentation. Practical Computer Literacy, 2 nd edition Chapter 15 2 What’s inside and on the CD? In this chapter, you will learn.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 5 1 Microsoft Office FrontPage 2003 Tutorial 5 – Creating Tables and Frames.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Copyright 2007, Paradigm Publishing Inc. ACCESS 2007 Chapter 5 BACKNEXTEND 5-1 LINKS TO OBJECTIVES Using the Form Button Using the Form Button Form Views.
Review for Final June 13, 2016.
Windows Tutorial 3 Personalizing Your Windows Environment
@NicJ
Chapter 2 – Introduction to the Visual Studio .NET IDE
EVENT TITLE Time, Date Location
EVENT TITLE Time, Date Location
Click to edit title TO ADD NEW SLIDE LAYOUTS: Make sure you have the ‘Home’ tab selected at the top of the PowerPoint screen and click the down facing.
Presentation transcript:

Jeff Batt eLearning Brothers Product Development Manager B.Y.O.L.: Titanium - Create Mobile Training as a Native App Using Javascript Jeff Batt eLearning Brothers Product Development Manager

twitter.com/jeffbatt01 My Approach How to guy - Focus on how you use the tools Everyone is on a different level - I’m starting at the beginning Tutorials about everything will be found on my blog (

Download Files Files to download: titanium/

Session Objectives What is Appcelerator Titanium? Where to get Titanium Windows and views Creating labels Creating image views Creating a button Creating a switch Adding interactivity Creating tables Adding interactivity in tables Playing sound Playing video Swiping events

Differences between Titanium & Phonegap Appcelerator TitaniumjQuery Mobile & Phonegap

Alloy VS Classic VS Alloy Classic

Alloy - MVC index.xml index.jsindex.tss

Starting a New Project

Classic: Alloy:

Creating a Window Classic Code: app.js //Establish the window and color var window = Titanium.UI.createWindow({ backgroundColor:'red' }); //Open the window window.open();

Creating a Window Alloy Code: index.xml index.tss ".container": { backgroundColor:"red" }

Windows and Views Window 1 View 1 View 2 View 3

Different Types of Views Window 1 Image View Table View Scroll View

Analogy - Creating Objects then Adding to Window Get the Actor var actor = Ti.UI.createView({ }); Get the Object

Analogy - Creating Objects then Adding to Window Add Attributes to Actor - Makeup - Costume - etc var actor = Ti.UI.createView({ backgroundColor:'red', width:100, height:100, top:20 }); Add Attributes to the Object - Width - Height - etc

Analogy - Creating Objects then Adding to Window Add the actor to the stage/camera var actor = Ti.UI.createView({ backgroundColor:'red', width:100, height:100, top:20 }); window.add(actor); Add object to the window or view image.addEventListener('click', function(){ alert('This is a test'); })

Analogy - Creating Objects then Adding to Window XML - Get the Actor function doClick(e) { //Tell the actor what to do } JS - Script what the actor does TSS - Define Attributes "#actor":{ top: 10, width: 260, height: 95 }

Creating a View Classic Code: app.js //Create the view and it's attributes var view1 = Ti.UI.createView({ backgroundColor:'red', width:100, height:100, top:20 }); //Add the view to the window or view window.add(view1);

Creating a View Alloy Code: index.xml index.tss ".container": { backgroundColor:"white" }, "#view": { backgroundColor:"red", width: 50, height: 50, top: 10 }

Adding Objects to a View Classic Code: app.js //Create the view and it's attributes var view1 = Ti.UI.createView({ backgroundColor:'red', width:100, height:100, top:20 }); //Create the object and its attributes var view2 = Ti.UI.createView({ backgroundColor:'black', width: 20, height: 20, top: 10 }); //Add the second object to the view not the window view1.add(view2); //Add the view to the window or view window.add(view1);

Adding Objects to a View Alloy Code: index.xml index.tss "#view": { backgroundColor:"red", width: 50, height: 50, top: 10 } "#view2": { backgroundColor:"black", width: 20, height: 20, top: 5 }

Adding Content to Views - Creating Labels Classic Code: app.js //This is the code to create a label var label1 = Ti.UI.createLabel({ color:'#999', text:'This is a text', font:{fontSize:20, fontfamily:'Helvetica Neue'}, textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER, width: Ti.UI.SIZE, height: Ti.UI.SIZE, }) //You then add your label to the window or view window.add(label1)

Adding Content to Views - Creating Labels Alloy Code: index.xml index.tss This is a text "#label1": { top: 30, textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER } "Label": { width: Ti.UI.SIZE, height: Ti.UI.SIZE, color: "#000" }

Adding Content to Views - Creating Labels Alloy Code (Option 2): index.xml <Label id="label1" color="#900" text="A simple label" textAlign="Ti.UI.TEXT_ALIGNMENT_CENTER" top="30" width="Ti.UI.SIZE" height="Ti.UI.SIZE" />

Adding Content to Views - Image View Classic Code: app.js //Create the image and point to the file in a folder var image = Ti.UI.createImageView({ image: 'images/Checkmark.png', //You can also add position or other attributes }) //Add the image to the window or view window.add(image);

Adding Content to Views - Image View Alloy Code: index.xml index.tss "#image": { } **NOTE** Alloy assets have to be within the assets folder

Adding Event Listeners Classic Code: app.js var image = Ti.UI.createImageView({ image: 'images/Checkmark.png', }) window.add(image); image.addEventListener('click', function(){ alert('This is a test'); })

Adding Event Listeners Alloy Code: index.xml index.js function doClick(e) { alert("This is a test"); }

Adding Content to Views - Creating a Button Classic Code: app.js var button = Ti.UI.createButton({ title:'Click Me', top: 10, width: 100, height: 50 }); window.add(button); button.addEventListener('click', function(){ alert('You clicked me') })

Adding Content to Views - Creating a Button Alloy Code: index.xml index.js function doClick(e) { alert("This is a test"); } index.tss "#button":{ top: 10, width: 100, height: 50 }

Adding Content to Views - Creating a CUSTOM Button Classic Code: app.js var button = Ti.UI.createButton({ title:'Click Me', //Establish Up image backgroundImage:'images/btn_up.png', //Establish Selected image backgroundSelectedImage: 'images/btn_down.png', top: 10, width: 260, height: 95 }); window.add(button); button.addEventListener('click', function(){ alert('You clicked me') })

Adding Content to Views - Creating a CUSTOM Button Alloy Code: index.xml index.js function doClick(e) { alert("Hello"); } index.tss "#button":{ backgroundImage: 'images/btn_up.png', backgroundSelectedImage: 'images/btn_down.png', top: 10, width: 260, height: 95 } **NOTE** Alloy assets have to be within the assets folder

Adding Content to Views - Creating a Switch Classic Code: app.js var basicSwitch = Ti.UI.createSwitch({ value:true, }) window.add(basicSwitch); basicSwitch.addEventListener('change', function(){ alert('Switch Value: ' + basicSwitch.value) })

Adding Content to Views - Creating a Switch Alloy Code: index.xml index.js function outputState(e) { alert('Switch Value: ' + e.value); }

Adding Content to Views - Creating a Text Field Classic Code: app.js var textField = Ti.UI.createTextField({ borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED, color:’#336699’, top: 10, left: 10, width: 250, height: 60 }) window.add(textField);

Adding Content to Views - Creating a Text Field Alloy Code: index.xml index.tss "#textField": { borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED, color: "#336699", top: 10, left: 10, width: 250, height: 60 }

Creating Tables Classic Code: app.js var tableData = [ {title:'Apples'}, {title: 'Bananas'}, {title: 'Potatoes'} ]; var table = Ti.UI.createTableView({ data: tableData }) window.add(table);

Creating Tables Alloy Code: index.xml

Adding Events to Tables Classic Code: app.js table.addEventListener('click', function(e){ if(e.index == 0){ alert('You clicked 1') } else if (e.index == 1){ alert('You clicked 2') } })

Adding Events to Tables Alloy Code: index.xml index.js function tableCheck(e) { if(e.index == 0){ alert('You clicked 1') } else if (e.index == 1){ alert('You clicked 2') }

Creating Tables Sections Classic Code: app.js var sectionFruit = Ti.UI.createTableViewSection({headerTitle: 'Fruit'}); sectionFruit.add(Ti.UI.createTableViewRow({title:'Apples'})); sectionFruit.add(Ti.UI.createTableViewRow({title:'Bananas'})); var sectionVeg = Ti.UI.createTableViewSection({headerTitle: 'Veggies'}); sectionVeg.add(Ti.UI.createTableViewRow({title:'Carrots'})); sectionVeg.add(Ti.UI.createTableViewRow({title:'Potatoes'})); var table = Ti.UI.createTableView({ data: [sectionFruit, sectionVeg] }) window.add(table);

Creating Tables Sections Alloy Code: index.xml

Creating Tabs Classic Code: app.js var tabsGroup = Titanium.UI.createTabGroup(); //Create the Win1 var win1 = Titanium.UI.createWindow({ backgroundColor:'red' }); var tab1 = Titanium.UI.createTab({ icon: '/images/44-shoebox.png', title: 'Reference', window: win1 }); var win2 = Titanium.UI.createWindow({ backgroundColor:'green' }); var tab2 = Titanium.UI.createTab({ icon: '/images/46-movie-2.png', title: 'Sample', window: win2 }); tabsGroup.addTab(tab1); tabsGroup.addTab(tab2); tabsGroup.open();

Creating Tabs Alloy Code: index.xml I am Window 1 I am Window 2 index.tss "#window1":{ backgroundColor:"white" }, "#window2":{ backgroundColor:"white" }

Creating a Web View Classic Code: app.js var webView = Ti.UI.createWebView({ url:' }); window.add(webView);

Creating a Web View Alloy Code: index.xml

Creating a Scroll View Classic Code: app.js var scrollView = Ti.UI.createScrollView({ contentWidth: '80%', contentHeight: 'auto', showVerticalScrollIndicator: true, showHorizontalScrollIndicator: false, height: '80%', width: '80%' }); var view = Ti.UI.createView({ backgroundColor:'#336699', borderRadius: 10, top: 10, height: 2000, width: 1000 }); scrollView.add(view); window.add(scrollView);

Creating a Scroll View Alloy Code: index.xml

Creating a Scrollable View Classic Code: app.js var win = Ti.UI.createWindow(); var view1 = Ti.UI.createView({ backgroundColor:'#123' }); var view2 = Ti.UI.createView({ backgroundColor:'#246' }); var view3 = Ti.UI.createView({ backgroundColor:'#48b' }); var scrollableView = Ti.UI.createScrollableView({ views:[view1,view2,view3], showPagingControl:true }); win.add(scrollableView); win.open();

Creating a Scrollable View Alloy Code: index.xml

Playing Sound **NOTE** Classic assets have to be within a folder Classic Code: app.js var player = Ti.Media.createSound({ url:'audio/start_race.mp3' }) player.play();

Playing Sound **NOTE** Alloy assets have to be within the assets folder Alloy Code: index.xml index.js var player = Ti.Media.createSound({ url:'audio/start_race.mp3' }) player.play();

Playing Sound in a Function Classic Code: app.js image = Ti.UI.createImageView({ image: 'images/Checkmark.png' }) var player = Ti.Media.createSound({ url:'audio/Wrong.mp3' }) window.add(image); image.addEventListener('click', function(){ player.play(); }); **NOTE** Classic assets have to be within the a folder

Playing Sound in a Function Alloy Code: index.xml index.js var player = Ti.Media.createSound({ url:'audio/Wrong.mp3' }) function doClick(e) { player.play(); } **NOTE** Alloy assets have to be within the assets folder

Playing Video Classic Code: app.js **NOTE** Classic assets have to be within a folder var videoPlayer = Ti.Media.createVideoPlayer({ url: 'video/Silly_Walks.mp4', top: 10, autoplay: false, height: 230, width: 300, mediaControlStyle: Ti.Media.VIDEO_CONTROL_DEFAULT, scalingMode: Ti.Media.VIDEO_SCALING_ASPECT_FIT }); window.add(videoPlayer);

Playing Video Alloy Code: index.xml index.tss **NOTE** Alloy assets have to be within the assets folder "#videoPlayer": { top:2, height:300, width:300, backgroundColor: 'black' }

Swiping Events Classic Code: app.js window.addEventListener('swipe', function(e){ if(e.direction == 'left'){ alert('You swiped left') } else if (e.direction == 'right'){ alert('You swiped right') } })

Swiping Events Alloy Code: index.xml index.tss function swipeEvent(e){ if(e.direction == 'left'){ alert('You swiped left') } else if (e.direction == 'right'){ alert('You swiped right') }

Two Finger Tap window.addEventListener('twofingertap', function(e){ alert('Two fingers') }) Classic Code: app.js

Two Finger Tap Alloy Code: index.xml index.js function twoFingers(){ alert("Two fingers"); }

Shake Events Classic Code: app.js Titanium.Gesture.addEventListener('shake', function(e){ alert('Stop shaking me') })

Shake Events Alloy Code: index.js Titanium.Gesture.addEventListener('shake', function(e){ alert('Stop shaking me') })

Toolbar var window = Titanium.UI.createWindow({ backgroundColor:'#336699', title:'Main Window' }); var send = Titanium.UI.createButton({ title: 'Send', style: Titanium.UI.iPhone.SystemButtonStyle.DONE, }); var camera = Titanium.UI.createButton({ systemButton: Titanium.UI.iPhone.SystemButton.CAMERA, }); var cancel = Titanium.UI.createButton({ systemButton: Titanium.UI.iPhone.SystemButton.CANCEL }); var flexSpace = Titanium.UI.createButton({ systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE }); var toolbar = Titanium.UI.iOS.createToolbar({ items:[send, flexSpace, camera, flexSpace, cancel], bottom:0, borderTop:true, borderBottom:false }); window.add(toolbar); window.open(); Classic Code: app.js

Toolbar Alloy Code: index.xml I am Window 1

Tabbed Bar Classic Code: app.js var window = Titanium.UI.createWindow({ backgroundColor:'#ffffff' }); var bb1 = Titanium.UI.iOS.createTabbedBar({ labels:['One', 'Two', 'Three'], backgroundColor:'#336699', top:50, style:Titanium.UI.iPhone.SystemButtonStyle.BAR, height:25, width:200 }); window.add(bb1); window.open();

Tabbed Bar Alloy Code: index.xml One Two Three

Picker app.js Ti.UI.backgroundColor = 'white'; var win = Ti.UI.createWindow({ exitOnClose: true, layout: 'vertical' }); var picker = Ti.UI.createPicker({ top:50 }); var data = []; data[0]=Ti.UI.createPickerRow({title:'Bananas'}); data[1]=Ti.UI.createPickerRow({title:'Strawberries'}); data[2]=Ti.UI.createPickerRow({title:'Mangos'}); data[3]=Ti.UI.createPickerRow({title:'Grapes'}); picker.add(data); picker.selectionIndicator = true; win.add(picker); win.open(); // must be after picker has been displayed picker.setSelectedRow(0, 2, false); // select Mangos Classic Code:

Toolbar Alloy Code: index.xml

Custom Alerts Classic Code: app.js var window = Titanium.UI.createWindow({ backgroundColor:'#ffffff' }); var dialog = Ti.UI.createAlertDialog({ message: 'The file has been deleted', ok: 'Okay', title: 'File Deleted' }); window.addEventListener('click', function(e){ dialog.show(); }); window.open();

Custom Alerts Classic Code: app.js var window = Titanium.UI.createWindow({ backgroundColor:'#ffffff' }); var dialog = Ti.UI.createAlertDialog({ cancel:1, buttonNames: ['Confirm', 'Cancel', 'Help'], message: 'The file has been deleted', title: 'File Deleted' }); window.addEventListener('click', function(e){ dialog.show(); }); dialog.addEventListener('click', function(e){ if(e.index === e.source.cancel){ Ti.API.info('The cancel button was clicked'); } else if (e.index === 1){ Ti.API.info('The help button was clicked'); } }); window.open();

Opening Up Another Page - Part 1 Classic Code: app.js var window = Titanium.UI.createWindow({ backgroundColor:'#336699', title:'Main Window' }); //Add button to first window var b3 = Titanium.UI.createButton({ title:'Open New Win', width:200, height:40, top:110 }); window.add(b3); //Event listener to open new window b3.addEventListener('click', function() { var w = Titanium.UI.createWindow({ backgroundColor:'#336699', title:'New Window', barColor:'black', url:'new_window.js' }); w.open(); }); window.open();

Opening Up Another Page - Part 2 Classic Code: new_window.js var win = Ti.UI.currentWindow; var label = Ti.UI.createLabel({ color:'#fff', text:'test label on new window', font:{fontSize:20,fontFamily:'Helvetica Neue'}, textAlign:'center', width:'auto', top: 20 }); label.addEventListener('click', function(){ win.close(); }) win.add(label);

Opening Up Another Page - Part 1 XML Alloy Code: index.xml I'm Window 1 win2.xml I'm Window 2

Opening Up Another Page - Part 2 TSS Alloy Code: index.tss ".container": { backgroundColor:"white" }, "#Label": { width: Ti.UI.SIZE, height: Ti.UI.SIZE, color: "#000" } win2.tss "#container":{ backgroundColor: "#000" }, "#thelabel":{ height: Ti.UI.SIZE, width: Ti.UI.SIZE, color: "#fff" }

Opening Up Another Page - Part 3 JS Alloy Code: index.js function showWin1(e) { var w=Alloy.createController('win2').getView(); w.open(); } $.index.open(); win2.js function closeme(){ $.container.close(); };