SlideShare a Scribd company logo
NGUYEN TUAN LAM

CWI Team
Advance Jquery Plugins


 - Overview Jquery Plugin

 - How to create a Jquery plugin

 - How to apply, custom Jquery plugins

 - Share some knowledge to debug issues related javascript/jquery




                    www.exoplatform.com - Copyright 2012 eXo Platform   2
Agenda

- Introduce some common jquery plugins

- Some rules of Jquery plugins development

- How to create a Jquery plugin

- How to custom Jquery plugins

- Share some knowledge related
javascript/jquery




             www.exoplatform.com - Copyright 2012 eXo Platform   3
Overview some jquery plugin


- Jquery plugin simple slideshow

- Jquery plugin rotator slider

- Jquery plugin modal/lightbox

- Jquery plugin dropdown menu




                       www.exoplatform.com - Copyright 2012 eXo Platform   4
Some rules of Jquery plugin development


    Naming your file


    Naming prefix for all related files with your plugin

jquery.myplugin.js

jquery.myplugin.css


    Register in Jquery.fn

(function($){
    //Attach this new method to jQuery
    $.fn.myplugin = function(instanceSettings) {
     // code plugin in here...
    }
})(jQuery);



                          www.exoplatform.com - Copyright 2012 eXo Platform   5
Some rules of Jquery plugin development (Continue...)


     Register in Jquery.fn(Continue...) :
(function($){
    //Attach this new method to jQuery
    $.fn.extend({
          // pluginname is myplugin – constructor should be myplugin
          myplugin: function() {
          }
    });
})(jQuery);




                            www.exoplatform.com - Copyright 2012 eXo Platform   6
Some rules of Jquery plugin development (Continue...)


     Jquery plugin name same the method constructor
(function($){
    $.fn.extend({
          // pluginname is myplugin – constructor should be myplugin
          myplugin: function() {
          }
    });
})(jQuery);




                            www.exoplatform.com - Copyright 2012 eXo Platform   7
Some rules of Jquery plugin development (Continue...)

     Be aware, when use $ instead of Jquery, should be make sure it noConflict
var $ = jQuery.noConflict();

     Recommend based on the fluent interface of Jquery plugin
(function($){
    $.fn.extend({
          myplugin: function() {
              return this.each(function() {
              });
          }
    });
})(jQuery);


                               www.exoplatform.com - Copyright 2012 eXo Platform   8
Some rules of Jquery plugin development (Continue...)

Handle sets one or multiple elements
(function($){
  $.fn.extend({
        myplugin: function() {
            return this.each(function() { //set for one or multiple elements
            });
        }
  });
})(jQuery);




                            www.exoplatform.com - Copyright 2012 eXo Platform   9
Some rules of Jquery plugin development (Continue...)


          Make default options accessible from outside
function($){

    $.fn.extend({

          myplugin: function(options) {

              var defaults = { speed: '500' ; color: '#ffff00'; }

              var options = $.extend(defaults, options);

              return this.each(function() {

                    var o = options;

                    alert(o.color);

              });

          }

    });

})(jQuery);
Create a JQuery plugin

Syntax:

(function($){
   //Attach this new method to jQuery
   $.fn.extend({

     //This is where you write your plugin's name
     pluginname: function() {

          //Iterate over the current set of matched elements
          return this.each(function() {
              //code to be here
          });
     }
    });
})(jQuery);



                        www.exoplatform.com - Copyright 2012 eXo Platform   11
Create a Jquery plugin (continue...)

Optional:

(function($){
    $.fn.extend({
        //pass the options variable to the function
        myplugin: function(options) {
           //Set the default values, use comma to separate the settings, example:
           var defaults = {
               'foo' : 'bar'
           }
           var options = $.extend(defaults, options);
           return this.each(function() {
               var o = options;
              alert(o.foo);
           });
        }
    });
})(jQuery);

                       www.exoplatform.com - Copyright 2012 eXo Platform            12
Create a Jquery Plugin (Continue...)

Another way to create a simple plugin :

var myplugin = {
  init: function() {
         // initialize options, trigger on here
   },
     overlay: function(options) {
         // Check options and call function with the option
   },
     withoutMask : function(object, option) {
         // Create overlay popup without mask
  },
     maskEffect : function(object) {
         // Cretae overlay popup with mask
     }
}



                       www.exoplatform.com - Copyright 2012 eXo Platform   13
Create a Jquery plugin (continue)

Use :

$(document).ready(function() {
     $('#selector').myplugin({foo: 'foobar'});
 });


$(document).ready(function() {
      $(“.links”).click(function(e){
           e.preventDefault();
           // do something here
     }) ;
 });




                         www.exoplatform.com - Copyright 2012 eXo Platform   14
Custom a Jquery plugin


- Use the unpack version of jquery plugin to custom.

- See the comment description default options of jquery plugin to understand what
does it mean.

- Try the function Constructor of the plugin to see initializations.

- Find the function animate to see how it works

- Custom jquery plugin follow your requirement.




                        www.exoplatform.com - Copyright 2012 eXo Platform      15
Custom a Jquery plugin (Continue...)

Example: Custom jquery scrollContent plugin:

http://swip.codylindley.com/scrollContentDemo.html


- Custom a scrollContent to simple jquery slideshow

demo by code



- Custom a scrollContent to jquery slider

demo by code

- Custom animations and transitions

demo by code



                    www.exoplatform.com - Copyright 2012 eXo Platform   16
Some ways debug and fixed issues related javascript


    Use Firebug


    Use function Console.log() to see the output


    Use alert message of javascript


    Demo by code




                        www.exoplatform.com - Copyright 2012 eXo Platform   17
Question & Answer




  www.exoplatform.com - Copyright 2012 eXo Platform   18
Ad

More Related Content

What's hot (19)

A dive into Symfony 4
A dive into Symfony 4A dive into Symfony 4
A dive into Symfony 4
Michele Orselli
 
java2 swing
java2 swingjava2 swing
java2 swing
guest0282b71
 
Http Communication in Angular 2.0
Http Communication in Angular 2.0Http Communication in Angular 2.0
Http Communication in Angular 2.0
Eyal Vardi
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
Nagaraju Sangam
 
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
Eyal Vardi
 
Hidden in plain site – joomla! hidden secrets for code monkeys
Hidden in plain site – joomla! hidden secrets for code monkeysHidden in plain site – joomla! hidden secrets for code monkeys
Hidden in plain site – joomla! hidden secrets for code monkeys
Nicholas Dionysopoulos
 
jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010
mennovanslooten
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4
Javier Eguiluz
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
Eyal Vardi
 
Sane Async Patterns
Sane Async PatternsSane Async Patterns
Sane Async Patterns
TrevorBurnham
 
Nicolas Embleton, Advanced Angular JS
Nicolas Embleton, Advanced Angular JSNicolas Embleton, Advanced Angular JS
Nicolas Embleton, Advanced Angular JS
JavaScript Meetup HCMC
 
Web 11 | AJAX + JSON + PHP
Web 11 | AJAX + JSON + PHPWeb 11 | AJAX + JSON + PHP
Web 11 | AJAX + JSON + PHP
Mohammad Imam Hossain
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
Eyal Vardi
 
Curso Symfony - Clase 2
Curso Symfony - Clase 2Curso Symfony - Clase 2
Curso Symfony - Clase 2
Javier Eguiluz
 
Web 10 | PHP with MySQL
Web 10 | PHP with MySQLWeb 10 | PHP with MySQL
Web 10 | PHP with MySQL
Mohammad Imam Hossain
 
Как получить чёрный пояс по WordPress?
Как получить чёрный пояс по WordPress?Как получить чёрный пояс по WordPress?
Как получить чёрный пояс по WordPress?
Yevhen Kotelnytskyi
 
Deep dive into Oracle ADF
Deep dive into Oracle ADFDeep dive into Oracle ADF
Deep dive into Oracle ADF
Euegene Fedorenko
 
Как получить чёрный пояс по WordPress? v2.0
Как получить чёрный пояс по WordPress? v2.0Как получить чёрный пояс по WordPress? v2.0
Как получить чёрный пояс по WordPress? v2.0
Yevhen Kotelnytskyi
 
2009 Hackday Taiwan Yui
2009 Hackday Taiwan Yui2009 Hackday Taiwan Yui
2009 Hackday Taiwan Yui
JH Lee
 
Http Communication in Angular 2.0
Http Communication in Angular 2.0Http Communication in Angular 2.0
Http Communication in Angular 2.0
Eyal Vardi
 
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
Eyal Vardi
 
Hidden in plain site – joomla! hidden secrets for code monkeys
Hidden in plain site – joomla! hidden secrets for code monkeysHidden in plain site – joomla! hidden secrets for code monkeys
Hidden in plain site – joomla! hidden secrets for code monkeys
Nicholas Dionysopoulos
 
jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010jQuery Bay Area Conference 2010
jQuery Bay Area Conference 2010
mennovanslooten
 
Curso Symfony - Clase 4
Curso Symfony - Clase 4Curso Symfony - Clase 4
Curso Symfony - Clase 4
Javier Eguiluz
 
Angular 2.0 Routing and Navigation
Angular 2.0 Routing and NavigationAngular 2.0 Routing and Navigation
Angular 2.0 Routing and Navigation
Eyal Vardi
 
Angular 2.0 forms
Angular 2.0 formsAngular 2.0 forms
Angular 2.0 forms
Eyal Vardi
 
Curso Symfony - Clase 2
Curso Symfony - Clase 2Curso Symfony - Clase 2
Curso Symfony - Clase 2
Javier Eguiluz
 
Как получить чёрный пояс по WordPress?
Как получить чёрный пояс по WordPress?Как получить чёрный пояс по WordPress?
Как получить чёрный пояс по WordPress?
Yevhen Kotelnytskyi
 
Как получить чёрный пояс по WordPress? v2.0
Как получить чёрный пояс по WordPress? v2.0Как получить чёрный пояс по WordPress? v2.0
Как получить чёрный пояс по WordPress? v2.0
Yevhen Kotelnytskyi
 
2009 Hackday Taiwan Yui
2009 Hackday Taiwan Yui2009 Hackday Taiwan Yui
2009 Hackday Taiwan Yui
JH Lee
 

Viewers also liked (7)

Wg11 automaive
Wg11 automaiveWg11 automaive
Wg11 automaive
Anshul Aggarwal
 
E xo mobile_overview_best_practice_in_mobile_application_design
E xo mobile_overview_best_practice_in_mobile_application_designE xo mobile_overview_best_practice_in_mobile_application_design
E xo mobile_overview_best_practice_in_mobile_application_design
adm_exoplatform
 
I os
I osI os
I os
adm_exoplatform
 
Hadoop
HadoopHadoop
Hadoop
adm_exoplatform
 
Jquery
JqueryJquery
Jquery
adm_exoplatform
 
Memory and runtime analysis
Memory and runtime analysisMemory and runtime analysis
Memory and runtime analysis
adm_exoplatform
 
Magento
MagentoMagento
Magento
adm_exoplatform
 
Ad

Similar to Advance jquery-plugin (20)

JQuery plugin development fundamentals
JQuery plugin development fundamentalsJQuery plugin development fundamentals
JQuery plugin development fundamentals
Bastian Feder
 
Jquery plugin development
Jquery plugin developmentJquery plugin development
Jquery plugin development
Faruk Hossen
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery Fundamentals
Gil Fink
 
Making a simple jQuery plug-in
Making a simple jQuery plug-inMaking a simple jQuery plug-in
Making a simple jQuery plug-in
Dylan Fogarty-MacDonald
 
Ditching JQuery
Ditching JQueryDitching JQuery
Ditching JQuery
howlowck
 
Javascript Frameworks for Joomla
Javascript Frameworks for JoomlaJavascript Frameworks for Joomla
Javascript Frameworks for Joomla
Luke Summerfield
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
patter
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
Thierry Wasylczenko
 
Converting your JS library to a jQuery plugin
Converting your JS library to a jQuery pluginConverting your JS library to a jQuery plugin
Converting your JS library to a jQuery plugin
thehoagie
 
20150516 modern web_conf_tw
20150516 modern web_conf_tw20150516 modern web_conf_tw
20150516 modern web_conf_tw
Tse-Ching Ho
 
Overlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh MyOverlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh My
Steve McMahon
 
jQuery secrets
jQuery secretsjQuery secrets
jQuery secrets
Bastian Feder
 
Beyond DOMReady: Ultra High-Performance Javascript
Beyond DOMReady: Ultra High-Performance JavascriptBeyond DOMReady: Ultra High-Performance Javascript
Beyond DOMReady: Ultra High-Performance Javascript
aglemann
 
J query training
J query trainingJ query training
J query training
FIS - Fidelity Information Services
 
Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
wpnepal
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
arcware
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Prototype & jQuery
Prototype & jQueryPrototype & jQuery
Prototype & jQuery
Remy Sharp
 
Frontin like-a-backer
Frontin like-a-backerFrontin like-a-backer
Frontin like-a-backer
Frank de Jonge
 
Ditching jQuery Madison
Ditching jQuery MadisonDitching jQuery Madison
Ditching jQuery Madison
Hao Luo
 
JQuery plugin development fundamentals
JQuery plugin development fundamentalsJQuery plugin development fundamentals
JQuery plugin development fundamentals
Bastian Feder
 
Jquery plugin development
Jquery plugin developmentJquery plugin development
Jquery plugin development
Faruk Hossen
 
jQuery Fundamentals
jQuery FundamentalsjQuery Fundamentals
jQuery Fundamentals
Gil Fink
 
Ditching JQuery
Ditching JQueryDitching JQuery
Ditching JQuery
howlowck
 
Javascript Frameworks for Joomla
Javascript Frameworks for JoomlaJavascript Frameworks for Joomla
Javascript Frameworks for Joomla
Luke Summerfield
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
patter
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
Thierry Wasylczenko
 
Converting your JS library to a jQuery plugin
Converting your JS library to a jQuery pluginConverting your JS library to a jQuery plugin
Converting your JS library to a jQuery plugin
thehoagie
 
20150516 modern web_conf_tw
20150516 modern web_conf_tw20150516 modern web_conf_tw
20150516 modern web_conf_tw
Tse-Ching Ho
 
Overlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh MyOverlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh My
Steve McMahon
 
Beyond DOMReady: Ultra High-Performance Javascript
Beyond DOMReady: Ultra High-Performance JavascriptBeyond DOMReady: Ultra High-Performance Javascript
Beyond DOMReady: Ultra High-Performance Javascript
aglemann
 
Avinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPressAvinash Kundaliya: Javascript and WordPress
Avinash Kundaliya: Javascript and WordPress
wpnepal
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
arcware
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Prototype & jQuery
Prototype & jQueryPrototype & jQuery
Prototype & jQuery
Remy Sharp
 
Ditching jQuery Madison
Ditching jQuery MadisonDitching jQuery Madison
Ditching jQuery Madison
Hao Luo
 
Ad

More from adm_exoplatform (8)

Development withforce
Development withforceDevelopment withforce
Development withforce
adm_exoplatform
 
Jquery ui
Jquery uiJquery ui
Jquery ui
adm_exoplatform
 
Cmsms
CmsmsCmsms
Cmsms
adm_exoplatform
 
Java application server in the cloud
Java application server in the cloudJava application server in the cloud
Java application server in the cloud
adm_exoplatform
 
Jvm mbeans jmxtran
Jvm mbeans jmxtranJvm mbeans jmxtran
Jvm mbeans jmxtran
adm_exoplatform
 
Git training
Git trainingGit training
Git training
adm_exoplatform
 
Cluster mode and plf cluster
Cluster mode and plf clusterCluster mode and plf cluster
Cluster mode and plf cluster
adm_exoplatform
 
Cluster mode and plf cluster
Cluster mode and plf clusterCluster mode and plf cluster
Cluster mode and plf cluster
adm_exoplatform
 

Recently uploaded (20)

Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
AI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global TrendsAI and Data Privacy in 2025: Global Trends
AI and Data Privacy in 2025: Global Trends
InData Labs
 
Semantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AISemantic Cultivators : The Critical Future Role to Enable AI
Semantic Cultivators : The Critical Future Role to Enable AI
artmondano
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Drupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy ConsumptionDrupalcamp Finland – Measuring Front-end Energy Consumption
Drupalcamp Finland – Measuring Front-end Energy Consumption
Exove
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 

Advance jquery-plugin

  • 2. Advance Jquery Plugins - Overview Jquery Plugin - How to create a Jquery plugin - How to apply, custom Jquery plugins - Share some knowledge to debug issues related javascript/jquery www.exoplatform.com - Copyright 2012 eXo Platform 2
  • 3. Agenda - Introduce some common jquery plugins - Some rules of Jquery plugins development - How to create a Jquery plugin - How to custom Jquery plugins - Share some knowledge related javascript/jquery www.exoplatform.com - Copyright 2012 eXo Platform 3
  • 4. Overview some jquery plugin - Jquery plugin simple slideshow - Jquery plugin rotator slider - Jquery plugin modal/lightbox - Jquery plugin dropdown menu www.exoplatform.com - Copyright 2012 eXo Platform 4
  • 5. Some rules of Jquery plugin development  Naming your file  Naming prefix for all related files with your plugin jquery.myplugin.js jquery.myplugin.css  Register in Jquery.fn (function($){ //Attach this new method to jQuery $.fn.myplugin = function(instanceSettings) { // code plugin in here... } })(jQuery); www.exoplatform.com - Copyright 2012 eXo Platform 5
  • 6. Some rules of Jquery plugin development (Continue...)  Register in Jquery.fn(Continue...) : (function($){ //Attach this new method to jQuery $.fn.extend({ // pluginname is myplugin – constructor should be myplugin myplugin: function() { } }); })(jQuery); www.exoplatform.com - Copyright 2012 eXo Platform 6
  • 7. Some rules of Jquery plugin development (Continue...)  Jquery plugin name same the method constructor (function($){ $.fn.extend({ // pluginname is myplugin – constructor should be myplugin myplugin: function() { } }); })(jQuery); www.exoplatform.com - Copyright 2012 eXo Platform 7
  • 8. Some rules of Jquery plugin development (Continue...)  Be aware, when use $ instead of Jquery, should be make sure it noConflict var $ = jQuery.noConflict();  Recommend based on the fluent interface of Jquery plugin (function($){ $.fn.extend({ myplugin: function() { return this.each(function() { }); } }); })(jQuery); www.exoplatform.com - Copyright 2012 eXo Platform 8
  • 9. Some rules of Jquery plugin development (Continue...) Handle sets one or multiple elements (function($){ $.fn.extend({ myplugin: function() { return this.each(function() { //set for one or multiple elements }); } }); })(jQuery); www.exoplatform.com - Copyright 2012 eXo Platform 9
  • 10. Some rules of Jquery plugin development (Continue...)  Make default options accessible from outside function($){ $.fn.extend({ myplugin: function(options) { var defaults = { speed: '500' ; color: '#ffff00'; } var options = $.extend(defaults, options); return this.each(function() { var o = options; alert(o.color); }); } }); })(jQuery);
  • 11. Create a JQuery plugin Syntax: (function($){ //Attach this new method to jQuery $.fn.extend({ //This is where you write your plugin's name pluginname: function() { //Iterate over the current set of matched elements return this.each(function() { //code to be here }); } }); })(jQuery); www.exoplatform.com - Copyright 2012 eXo Platform 11
  • 12. Create a Jquery plugin (continue...) Optional: (function($){ $.fn.extend({ //pass the options variable to the function myplugin: function(options) { //Set the default values, use comma to separate the settings, example: var defaults = { 'foo' : 'bar' } var options = $.extend(defaults, options); return this.each(function() { var o = options; alert(o.foo); }); } }); })(jQuery); www.exoplatform.com - Copyright 2012 eXo Platform 12
  • 13. Create a Jquery Plugin (Continue...) Another way to create a simple plugin : var myplugin = { init: function() { // initialize options, trigger on here }, overlay: function(options) { // Check options and call function with the option }, withoutMask : function(object, option) { // Create overlay popup without mask }, maskEffect : function(object) { // Cretae overlay popup with mask } } www.exoplatform.com - Copyright 2012 eXo Platform 13
  • 14. Create a Jquery plugin (continue) Use : $(document).ready(function() { $('#selector').myplugin({foo: 'foobar'}); }); $(document).ready(function() { $(“.links”).click(function(e){ e.preventDefault(); // do something here }) ; }); www.exoplatform.com - Copyright 2012 eXo Platform 14
  • 15. Custom a Jquery plugin - Use the unpack version of jquery plugin to custom. - See the comment description default options of jquery plugin to understand what does it mean. - Try the function Constructor of the plugin to see initializations. - Find the function animate to see how it works - Custom jquery plugin follow your requirement. www.exoplatform.com - Copyright 2012 eXo Platform 15
  • 16. Custom a Jquery plugin (Continue...) Example: Custom jquery scrollContent plugin: http://swip.codylindley.com/scrollContentDemo.html - Custom a scrollContent to simple jquery slideshow demo by code - Custom a scrollContent to jquery slider demo by code - Custom animations and transitions demo by code www.exoplatform.com - Copyright 2012 eXo Platform 16
  • 17. Some ways debug and fixed issues related javascript  Use Firebug  Use function Console.log() to see the output  Use alert message of javascript  Demo by code www.exoplatform.com - Copyright 2012 eXo Platform 17
  • 18. Question & Answer www.exoplatform.com - Copyright 2012 eXo Platform 18