반응형
반응형

jquery와 angulars 같이 사용하기.

requireJS로 시작했다가 무거운거 같아서 그냥 같이 쓰는걸로 해봤다.

문법적인 문제는 발견되지 않았다. 너무 간단한 테스트라서 그럴지도.

 

AS-IS

 : index.html에 require.js와 main.js, angular.js, controllers.js 등을 녹여넣었다.

* index.html

<!doctype html>
<html lang="en" ng-app>
    <head>
        <title>jQuery+RequireJS Sample Page</title>
        <!-- This is a special version of jQuery with RequireJS built-in -->
        <script data-main="scripts/main" src="scripts/require-jquery.js"></script>
               </script>
    </head>
    <body ng-controller="PhoneListCtrl" >
        <h1>jQuery+RequireJS Sample Page</h1>
        <p>Look at source or inspect the DOM to see how it works.</p>
       
       
       
        <div id="mydiv">aaa</div>
        <p>Total number of phones: {{phones.length}} </p>
        <p>Angulars Templates - http://docs.angularjs.org/tutorial/step_02</p>

 <p>Nothing here {{'yet' + '!'}}</p>
 
 <p>1 + 2 = {{ 1 + 2 }}</p>
 
 <p class="hello">{{hello}}______</p>
    </body>
</html> 

* main.js - require.js에서 사용함. 

 require(["jquery"], function($) {
  $("#mydiv").html("Hello this is RequireJS talking");
});


require(["jquery", "jquery.alpha", "jquery.beta"], function($) {
    //the jquery.alpha.js and jquery.beta.js plugins have been loaded.
    $(function() {
        $('body').alpha().beta();
    });
});

// angular.JS, controllers.js 를 LOAD.
require(["angular"], function($) {

});
require(["controllers"], function($) {

});

* controllers.js - angular.js에서 사용 

 function PhoneListCtrl($scope) {
  $scope.phones = [
    {"name": "Nexus S",
     "snippet": "Fast just got faster with Nexus S.",
     "age": 0},
    {"name": "Motorola XOOM™ with Wi-Fi",
     "snippet": "The Next, Next Generation tablet.",
     "age": 1},
    {"name": "MOTOROLA XOOM™",
     "snippet": "The Next, Next Generation tablet.",
     "age": 2}
  ];
 
  $scope.orderProp = "age";  
  $scope.hello = "Hello, world!"; 
}

 

TO-BE

* index.html 에 다 순차적으로 호출하였다.(require.js 사용안함) 

 <!doctype html>
<html lang="en" ng-app>
    <head>
        <title>jQuery+RequireJS Sample Page</title>
        <!-- This is a special version of jQuery with RequireJS built-in -->
        <script src="scripts/angular.js" ></script>
      <script src="scripts/controllers.js"></script>
      <script src="scripts/jquery-1.5.2.min.js"></script>
      <script src="scripts/jquery.alpha.js" ></script>
      <script src="scripts/jquery.beta.js" ></script>
        <script>        
         $(document).ready(function(){
             $("#mydiv").html("Hello this is RequireJS talking");
             $('body').alpha().beta();
         });
   
        </script>
    </head>
    <body ng-controller="PhoneListCtrl" >
        <h1>jQuery+RequireJS Sample Page</h1>
        <p>Look at source or inspect the DOM to see how it works.</p>
       
       
       
        <div id="mydiv">aaa</div>
        <p>Total number of phones: {{phones.length}} </p>
        <p>Angulars Templates - http://docs.angularjs.org/tutorial/step_02</p>

 <p>Nothing here {{'yet' + '!'}}</p>
 
 <p>1 + 2 = {{ 1 + 2 }}</p>
 
 <p class="hello">{{hello}}______</p>
    </body>
</html>

 

 

 

 

 

 

반응형
반응형

 

RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node. Using a modular script loader like RequireJS will improve the speed and quality of your code.

 

http://requirejs.org/

 

 

프로젝트에 require.js와 main.js 파일이 필요하다.

아래에서 main.js를 호출하는 구문이다.

<script src="require.js" data-main="main"></script>

main.js( data-main="main" )에 로드할 JSLibrary와 해당 JSLabrary의 구문을 입력하면 된다.

아래에는 "jquery.js" 가 있어야 실행이 된다.

require(["jquery"], function($) {
  $(‘#mydiv”).html(‘Hello this is RequireJS talking”);
});

 

** Optimize your JavaScript with RequireJS

http://www.webdesignerdepot.com/2013/02/optimize-your-javascript-with-requirejs/

 

 

IE 6+ .......... compatible ✔
Firefox 2+ ..... compatible ✔
Safari 3.2+ .... compatible ✔
Chrome 3+ ...... compatible ✔
Opera 10+ ...... compatible ✔

Get started then check out the API.

 

require.js 2.1.4MinifiedWith Comments

All you need to start using require.js in the browser.

Sample RequireJS 2.1.4 + jQuery 1.9.1 projectDownload

A zip file containing a sample project that uses jQuery and RequireJS.

r.js: Optimizer and Node and Rhino adapterDownload

The r.js file allows you to run the optimizer as well as run modules in Node or Rhino.

If you are running in Node, and want to use npm to install this file via npm, see the Use with Node page for more information.

For information on its use, as well as how to get the JAR files to run it under Rhino, see the r.js README.

Plugins§ 2

These are useful loader plugins that have the same license terms as require.js itself. Download the plugin file and place it as a sibling to your "data-main" main.js script.

textDownload

Load text files and treat them as dependencies. Great for loading templates. The text strings can be inlined in an optimized build when the optimizer is used.

domReadyDownload

Wait for the DOM is ready. Useful for pausing execution of top level application logic until the DOM is ready for querying/modification.

cs (CoffeeScript)Download

Load files written in CoffeeScript. With this plugin, it is easy to code in CoffeeScript in the browser, it can participate in the optimizer optimizations, and it works in Node and Rhino via the RequireJS adapter. This is the best way to do cross-environment, modular CoffeeScript. The project home has more information on how to install and use it.

i18nDownload

Load string bundles used in internationalization (i18n) that are made up of separate country/language/locale-specific bundles.

반응형
반응형

25+ Excellent jQuery Menu Plugins

http://creativecan.com/2013/02/jquery-menu-plugins/

 

 

 

MenuStation – Real Unlimited Responsive Menu –

http://codecanyon.net/item/menustation-real-unlimited-responsive-menu/3076965?ref=andy4321&ref=andy4321&clickthrough_id=107725296&redirect_back=true

 

Metro Flexible Navigation – 

http://codecanyon.net/item/-metro-flexible-navigation/full_screen_preview/2796746

 

 

 

 

UberMenu – WordPress Mega Menu Plugin – MORE INFO

uber menu jQuery menu plugins

UberMenu is a user-friendly, highly customizable, responsive Mega Menu WordPress plugin. It works out of the box with the WordPress 3 Menu System, making it simple to get started but powerful enough to create highly customized and creative mega menu configurations.

MenuStation – Real Unlimited Responsive Menu – MORE INFO

MenuStation-Real-Unlimited-Responsive-Menu-jquery-menu

This plugin features real unlimited menu, responsive design, and many colors to change. it is easy to customize and light weight.

Menu with CSS3 Effects and Notification Bubbles – MORE INFO

menu css3 jQuery menu plugins

This Menu with CSS3 Effects and Notification Bubbles has everything you need. The functionality is divided in different parts and that makes it very powerful.

niceTree – JQuery Tree Plugin – MORE INFO

nicetree jQuery menu plugins

Get rid of that ugly tree menu on your site with niceTree. An easy to install JQuery plugin with more options than you’ll ever need. niceTree will take your HTML and turn it into a collapsible menu system with unlimited menus within menus.

Metro Flexible Navigation – MORE INFO

metro flexible menu jQuery menu plugins

The Metro Flexible Navigation is a simple, clean grid layout looking a lot like the new Windows 8 interface. It can be customized to be laid out horizontally or vertically. It’s scrollable and drag-able at the same time and contains useful sliding controls. Icons can be changed, there is a large collection available.

MeanMenu – MORE INFO

mean menu jQuery menu plugins

Main features include hide or show menu children, orientation adjustment and control screen width where the plugin activates. This plugin is easy to setup and configure and bundled with configurable CSS.

Memu – A simple CSS / JavaScript / JQuery Menu – MORE INFO

memu jQuery menu plugins

A small, solid jQuery plugin which is quite easy to use. It’s a menu which can be used with or without JQuery. It has feature so that when visitors are navigating your site, the selected item will stay highlighted.

Revolver – Sliding Website Plugin – MORE INFO

revolver jQuery menu plugins

This is not a menu plugin actually, but it can do some powerful stuff and create a creative navigation on you website. Revolver is a jQuery plugin for creating full screen sliding websites. It can be integrated into any website template.

jQuery Animated Button & Menu – MORE INFO

animated menu jQuery menu plugins

The animated button & menu jQuery plugin allows you to easily replace <a> links with animated buttons and grouping buttons into a menu (drop down menu).

jAccordion – jQuery Accordion – MORE INFO

jaccordion jQuery menu plugins

jAccordion is a complex and responsive jQuery plugin with powerful API, large amount of callbacks and options which let you customize it to suit your needs.

Cursor Following Menu – MORE INFO

cursor menu jQuery menu plugins

This is a navigation menu that will always follow your cursor. It was generated using CSS and jQuery library, which is easy to configure and implement. The script features CSS styling, 2-level navigation and simple markup.

jQuery Drilldown Menu – MORE INFO

drilldown menu jQuery menu plugins

iPhone inspired drilldown menu. So easy. So powerful.

Sticklr WP – Sticky Side Panel WordPress Plugin – MORE INFO

sticklr jQuery menu plugins

Stickr WP, a sticky side panel menu WordPress plugin. Inspired by Envato site-switcher, after released as CSS3 +jQuery, due to popular demand I decided to create this WordPress plugin version. The features are similar with jQuery version, only WordPress version has an intuitively easy administration panel, so you don’t have to know the coding behind it.

Shuffling Tiles jQuery Plugin – MORE INFO

Shuffling-Tiles-jquery-menu-

Inspired by the step by step movements of the shuffle dance and the new Metro UI look, Shuffling Tiles combines elements from both and then some, producing a versatile, animated and compact webpage widget. Use it when you have lot’s of information that you want to fit in a small area, and you want to present it in a lively, original and interactive way.

jQuery iNav – Products Showcasing Navigation – MORE INFO

inav jQuery menu plugins

iNav it’s a jQuery plugin that let you create an amazing animated Menu (even with multiple menus) or Items Showcasing. Inspired by Apple products navigation, iNav can introduce in your website a very powerful javascript navigation! In order to work properly, iNav requires at least jQuery 1.4 or higher.

jQuery Live Menu – MORE INFO

live menu jQuery menu plugins

jQuery Live Menu is a jQuery plugin that allows you to create easily nice and animated menus. Menus are opened on left or right click on the defined target. You can customize layout, effects and the tooltip design by jQuery parameters .

PullOuts – jQuery Slide-out Widgets – MORE INFO

pullouts jQuery menu plugins

PullOuts allows to grab any piece of content from a web page and display it as a pullout widget. Whether it’s a block of text, images, shopping cart, login, search or subscription form, a video or any other content – you can make it a pullout.

jQuery Push Menu – MORE INFO

jquery-push-menu

Now with hoverIntent integration. Cross Browser Compliant – IE9 , FF3+,Opera, Safari, Chrome. Mobile Ready – Works in mobile browsers. Sliding Sub menu level items.

Titan Menu – MORE INFO

titan menu

Titan Menu, a fresh and powerfull menu solution.

Sticklr – Sticky Side Panel CSS3 + jQuery Plugin – MORE INFO

sticklr jQuery menu plugins

The latest version is version 1.4, made on January of 2012. Custom tab size option was added and the ability for a tab to act as link was improved.

Superfish – Free jQuery Menu Plugin - MORE INFO

superfish jQuery menu plugins

Superfish is a JQuery plugin especially dedicated to menus. It allows many improvement from what you can achieve with HTML and CSS as such as hover support for IE6, animations, keyboard accessibility and more.

Smooth Expandable Menu – MORE INFO

smooth jQuery menu plugins

Smooth Expandable Menu is the definitive tool for building minimal vertical expandable menus, which can be easily customized due to its 17 built-in config parameters, directly from the html file / script call. The pack includes 3 samples (Serif, San Serif and Tiny), to make easier the integration on any web project. It uses Google Fonts library system, so you won’t need to integrate font files or @fontface scripts. It has been optimized for mobile devices.

jMenu – MORE INFO

jMenu-jquery-menu

jMenu is a jQuery plugin that allows the creation of horizontal navigations with unlimited sub-menus. Besides jQuery, it also requires jQuery UI and supports all the effects of this library (like fadeIn or slideDown). The markup of the menu is pretty clean as it makes use of nested lists.

Navigation Menu Widget – MORE INFO

navmenu jQuery menu plugins

This is an advanced plugin that gives you total control over the output of your menus. Support shortcodes, widget and template function. Easy to customize, full features. and supports Twitter Bootstrap. Displays a list of menu as links. This plugin is based on the WordPress function: wp_nav_menu()

jPie jQuery Circular Menu – MORE INFO

jpie jQuery menu plugins

jPie is a Contextual Circular Menu for jQuery. You can create countless instances and each instance can be fully customizable using the attributes provided by the plugin.

Fancy Typewriter – jQuery plugin – MORE INFO

Fancy-Typewriter-jquery-menus-plugin

Fancy Typewriter is a jQuery plugin for creating stunning menu effects and much more. Just add the plugin to any tag, which contains text. Check out the preview, which says more than words.

반응형
반응형

Beginner HTML5, JavaScript, jQuery, Backbone, and CSS3 Resources

http://www.elijahmanor.com/2013/01/beginner-html5-javascript-jquery.html

 

html5 Resources

Javascript Resources

Jquery  Resources

 

Backbone.js  Resources

CSS3  Resources

Feature detection   Resources

Responsive web design  Resources

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

반응형
반응형

출처 : http://www.jquery4u.com/page-layout/12-jquery-mobile-layout-plugins-examples/

12+ jQuery Mobile Layout Plugins and Examples

Check out our compilation of 12 jQuery Mobile Layout and Examples. These plugins can help you create multiple and/or split views on your mobile page layout. These plugins will dynamically lays out the pages based on your device orientation. Have fun!

Related Posts:

1. Three Column iPad Layout

jQuery UI powered bootstrap which provides an excellent start to an tablet/mobile layout for your website.

SourceDemo

2. JQM Multiview Plugin

Jquery Mobile plugin for panel layouts/views.
JQM Multiview Plugin
SourceDemo

3. Jquery Mobile SplitView

SplitView dynamically lays out the pages based on your tablet’s (iPad, etc) orientation, as well as your desktop’s screen size. Try it out, resize your browser, or turn your iPad to see it in portrait and landscape modes!
Jquery Mobile SplitView
SourceDemo

4. Multiview Plugin

This page is a multiview page containing 4 panels and 16 pages, which all were added to the DOM when loading the page (directly or from another JQM-page!).
Multiview Plugin
SourceDemo

5. Multi-page (boiler) Template

This is a multi-page boilerplate template that you can copy to build your first jQuery Mobile page. This template contains multiple “page” containers inside, unlike a single page template that has just one page within it.
Multi-page (boiler) Template
Source + Demo

6. Multi-Page Template

This strategy can be used to prefetch multiple pages up front and achieve quicker response times when loading sub-pages.
Multi-Page Template
Source + Demo

7. jQuery Mobile Multiple Pages

In this tutorial I’ll will show you how built a simple mobile site with multiple pages. The multiple pages could be embedded in the same document or they could be in separate files.
jQuery Mobile Multiple Pages
SourceDemo

8. 960 Grid on jQuery-Mobile

It merge the flexibility of 960.gs, and the ease of jquery mobile. It aims to bring more flexibility to jquery-mobile layout and thus make it easier to use on tablets.
960 Grid on jQuery-Mobile
SourceDemo

9. Creating A Tablet Split View For jQuery Mobile

In this screencast we are going to look at the jquerymobile.com source and grab the CSS that is created on the jQuery Mobile Docs to create the split view.
Tablet Split View For jQuery Mobile
Source + Demo

10. jQuery Mobile and Dynamic Page Generation

This is great for applications that generate HTML pages/fragments on the server-side, but there are sometimes cases where an application needs to dynamically generate page content on the client-side from JSON or some other format.
jQuery Mobile and Dynamic Page Generation
SourceDemo

11. Fixed toolbars

Toolbars that use the “fixedtoolbar” plugin will be fixed to the top or bottom of the viewport, while the page content scrolls freely in between. In browsers that don’t support fixed positioning, the toolbars will remain positioned in flow, at the top or bottom of the page.
Fixed toolbars
Source + Demo

12. app-UI

Is a collection of user interface components that may be helpful to web and mobile developers for creating interactive applications using HTML and JavaScript, especially those targeting mobile devices.
app-UI
SourceDemo

13. jquery-mobile – plugin: multiview

Features:
> fullscreen footer
> popovers: unlimited panels, each with JQM pages inside
> fullscreen-mode: on small screens popovers go fullscreen (resize your browser and reload the page)
> unbind from mobileinit to allow to have sites with both splitview and normal pages
jquery-mobile - plugin: multiview
SourceDemo

반응형
반응형

 

10 jQuery Grids Plugins

10 Awesome jQuery Grid Plugins to help get those layouts you always wanted. There are already a number of high quality jQuery grid plugins. We recognize they each have an impressive set of features, capabilities, and a level of use by members of the jQuery community. Below are some of the samples that you would consider putting up on your web page. Enjoy!

Related Posts:


Updated 01/08/2012: Added 11. jQuery Grid Flex

1. Flexigrid

Lightweight but rich data grid with resizable columns and a scrolling data to match the headers, plus an ability to connect to an xml based data source using Ajax to load the content. Similar in concept with the Ext Grid only its pure jQuery love, which makes it light weight and follows the jQuery mantra of running with the least amount of configuration.
Flexigrid.jpg
Source

2. Flurid Plugin

A cross-browser fluid width grid system optimized for flexibility (fluidity) and one of the only fluid width grid systems to work in Internet Explorer versions 5.0 and newer* without hiding pixels in margins. Like any grid system, the basic purpose is to break the page into a series of rows and columns, giving the designer an easy, rational way to organize and present content to the user.
Flurid-Plugin.jpg
Source

3. 960 Grid on jQuery-Mobile

A port of 960 grid to jquery mobile. It merges the flexibility of 960.gs, and the ease of jQuery mobile. It aims to bring more flexibility to jQuery-mobile layout and thus make it easier to use on tablets.
960-Grid-on-jQuery-Mobile.jpg
Source

4. jQuery.sheet

Gives you all sorts of possibilities when it comes to giving your web application a spreadsheet style interface with MS Excel style calculations.
jQuerysheet.jpg
Source

5. jQuery Grid

A jQuery grid plugin.
jQuery-Grid.jpg
Source

6. jQuery Grid Row Sizing

This plugin, applied to n-tables of an HTML page, provides the behavior of resizing rows by clicking over a “image handler”. Based in CSS (no DIVs inside TDs needed).
jQuery-Grid-Row-Sizing.jpg
Source

7. GridIron Plugin

This plug-in lets you create a grid using either tables or divs & spans. I originally developed it to work with CouchDB but it will work with any JSON source.
GridIron-Plugin.jpg
Source

8. #grid

This is a little tool we created for our Analog holding page. It inserts a layout grid in web pages, allow you to hold it in place, and toggle between displaying it in the foreground or background.
grid.jpg
Source

9. jQuery Bubble

This plugin adds bubbling functionality to jQuery. The code is similar to jQuery.fn.trigger’s because it’s meant to extend it. It also generates its own event object, that will remain untouched through the bubbling, meaning it’s safe to attach attributes to it and grab them with the ancestors while the event bubbles up.
jQuery-Bubble.jpg
Source

10. jQuery inGrid

Datagrids don’t have to be difficult to use anymore – say hi to Ingrid. Ingrid is an unobtrusive jQuery component that adds datagrid behaviors (column resizing, paging, sorting, row and column styling, and more) to your tables.
jQuery-inGrid.jpg
Source

11. jQuery Grid Flex

jquery-grid-flex
Demo

반응형

+ Recent posts