We are Web Technology Experts Team who provide you Important information on Web Development, Interview Questions and Answers, live project problem and their solution and online free tutorials.
Showing posts with label jquery. Show all posts
Showing posts with label jquery. Show all posts
Saturday 3 January 2015
Monday 27 October 2014
Lightbox vs Fancybox
Lightbox: It is a lightweight jQuery plugin used for showing images in overlay on the website.
Following are feature of Lightbox plugin.
- Show image in overlay.
- Show the Title of image in Overlay.
- Show image gallery in overlay with "Left", "Right" Button.
- In Image gallery, It support image movement with "Left" & "Right" keys.
- Open Iframe in overlay does not support.
Fancybox: It is jQuery plugin used for displaying images, videos (like youtube) on iframe and map etc in overlay on the website.
Following are feature of Fancybox plugin.
- Show image in overlay.
- Show the Title of image in Overlay.
- Show image gallery in overlay with "Left", "Right" Button.
- In Image gallery, It support image movement with "Left" & "Right" keys.
- Open Iframe in overlay - You can play youtube video in overlay.
- Support Ajax Processing Data.
- Play SWF Files in overlay.
- Google Map in Iframe.
- Support callback function when open pages in overlay.
- Handling "Not existing URL/Image" by plugin itself.
Demo & Download: http://fancyapps.com/fancybox/
Best Related Posts are Following:
- Top 10 jQuery interview Questions and Answers.
- How to remove all classes using jQuery?.
- Jquery Interview Questions and Answers for experienced.
- jQuery Interview Questions and Answers for experienced.
- Front End Developer Interview Questions and Answers.
- How to Add attribute in A-Tag using jQuery.
- Lightbox vs Fancybox.
- Pending Interview Questions and Answers.
- Ajax Methods in JQuery.
- jQuery Interview Questions and Answers.
- jQuery naming convention - jQuery tutorial for beginner.
- JQuery Interview Questions And Answers For Experienced.
Saturday 22 February 2014
Firebase Chat with Facebook and Twitter Integration
FireBase Chat
1). Its Free
2). You can integrate with Facebook/Twitter/Github etc
3) You can manage Chat (Can View/Update/Delete)
4) You can export chat in Json Form
5) API Available
Demo: http://firebase.github.io/firechat/
Tutorial: http://firebase.github.io/firechat/docs/
How to setup firebase chat
1) Register to https://www.firebase.com/
2) Login to your firebase account similar to https://blistering-fire-9888.firebaseio.com/
3) Go to Dashboard=>Simple Account
a) Add list of domains where your chat will be run, (for example localhost, www.example.com)
b) Set "Authentication Providers"
Here you can enable provider (Facebook|Twitter etc)
Enable the checkbox and put the required credentials
For facebook
i) Create a app
ii) In Site URL put "https://auth.firebase.com/auth/facebook/callback"
iii) In "Site and Review", Enable the app for public
iv) Copy your "App ID" and "App Secret" from "Settings" and paste in "firebase.com=>Simple Login=>Facebook"
For Twitter
i) Create a App in twitter.com
URL: https://apps.twitter.com/
ii) In Callback URL set " https://auth.firebase.com/auth/twitter/callback"
iii) Copy "API key" and "API secret" from twitter apps and paste in "firebase.com=>Simple Login=>Twitter" (Twitter Consumer Key,Twitter Consumer Secret)
4) Open Below URL's
http://firebase.github.io/firebase-simple-login/
a) Click on "Launch demo" of Facebook Link
b) Click on "Launch demo" of Twitter Link
1). Its Free
2). You can integrate with Facebook/Twitter/Github etc
3) You can manage Chat (Can View/Update/Delete)
4) You can export chat in Json Form
5) API Available
Demo: http://firebase.github.io/firechat/
Tutorial: http://firebase.github.io/firechat/docs/
How to setup firebase chat
1) Register to https://www.firebase.com/
2) Login to your firebase account similar to https://blistering-fire-9888.firebaseio.com/
3) Go to Dashboard=>Simple Account
a) Add list of domains where your chat will be run, (for example localhost, www.example.com)
b) Set "Authentication Providers"
Here you can enable provider (Facebook|Twitter etc)
Enable the checkbox and put the required credentials
For facebook
i) Create a app
ii) In Site URL put "https://auth.firebase.com/auth/facebook/callback"
iii) In "Site and Review", Enable the app for public
iv) Copy your "App ID" and "App Secret" from "Settings" and paste in "firebase.com=>Simple Login=>Facebook"
For Twitter
i) Create a App in twitter.com
URL: https://apps.twitter.com/
ii) In Callback URL set " https://auth.firebase.com/auth/twitter/callback"
iii) Copy "API key" and "API secret" from twitter apps and paste in "firebase.com=>Simple Login=>Twitter" (Twitter Consumer Key,Twitter Consumer Secret)
4) Open Below URL's
http://firebase.github.io/firebase-simple-login/
a) Click on "Launch demo" of Facebook Link
b) Click on "Launch demo" of Twitter Link
Best Related Posts are Following:
- Facebook SDK does not loading all.js.
- How to logout from facebook with javascritp SDK - FB.logout.
- Facebook SDK javascript - Facebook Login Check, Get Login Details, Share URL and POST to Profile.
- Facebook Login Integration - Multiple Facebook IDs for the same user[Solved].
- Share count and Share URL of Facebook, Twitter, LinkedIn and Pinterest.
- Disable facebook notification popup after Click on Facebook Like Button.
- How to share Embed youtube video on facebook From my website.
- How to Find a Facebook Profile From an Image URL.
- How to integrate Facebook open Graph API in Website.
- How to clear Facebook image cache.
- Facebook Comments Disable Comment using Yahoo, AOL or Hotmail.
- Facebook comments Integration in website.
- Facebook login with javascript SDK example.
- Facebook User Profile Get Custom Picture of Facebook User.
- Facebook Login with JavaScript.
- Firebase Chat with Facebook and Twitter Integration.
- Facebook Registration Plugin with Custom Fields.
- Facebook Social Plugins Integration in Website.
- jQuery Autocomplete like Facebook With Demo.
Friday 6 September 2013
jQuery datepicker first week monday
jQuery DatePicker is a Plugin provided by jQuery.com, This date picker enable user to select the dates like Date of Birth, Date of joining and select two dates. It have excellent feature like change the date format of date, disable the selection of previous date, disable the selection of next year, show the dates picker in different languages like chinse. You can do the lot of custom changes. All custom changes are available in their website.
Now, many different countries use different date format like USA start date with month, Indian start date with day and some country start date with year. This is 100% configurable in the jQuery plugin. you can set the dateFormat while creating the instance of date picker.
By default, the Datepicker opens in a small overlay onFocus and closes automatically onBlur or when a date is selected. For an inline calendar, simply attach the Datepicker to a div or span.
While creating the instance of datepicker, you can also change the what day of the week. You can start first day as Sunday OR Monday as per your requirement.n See the Following Example.
Change the first week from Sunday=>Monday
Just set the firstDay:1 which is 0 by default
jQuery('#date').datepicker({ changeMonth: true, changeYear: true, dateFormat: "mm/dd/yy", firstDay: 1 });
Another Example for multiple date option
$('.date').datepicker({ constrainInput: true, // prevent letters in the input field minDate: new Date(), // prevent selection of date older than today showOn: 'button', // Show a button next to the text-field autoSize: true, // automatically re-size the input field altFormat: 'yy-mm-dd', // Date Format used beforeShowDay: $.datepicker.noWeekends, // Disable selection of weekends firstDay: 1 // Start with Monday })
Demo:
http://docs.jquery.com/UI/Datepicker Best Related Posts are Following:
- jQuery Ajax Interview Questions and Answers for Experienced.
- Jquery Interview Questions and Answers for experienced.
- How can I check DOM is ready in jQuery.
- How to add new row in existing table using jQuery.
- How to Include a JavaScript file in another JavaScript file?.
- How can I get query string values in JavaScript and jQuery?.
- What is the Correct content-type of JSON and JSONP?.
- jQuery Mobile interview questions and answers.
- How to Add attribute in A-Tag using jQuery.
- Lightbox vs Fancybox.
- Firebase Chat with Facebook and Twitter Integration.
- jQuery datepicker first week monday.
- How to Create A Basic Plugin In JQuery.
- jQuery Function with Examples.
- jQuery Fancybox.
- Ajax AutoComplete for jQuery.
- jQuery multi column sorting with jQuery - Live Demo.
- jQuery Autocomplete like Facebook With Demo.
- jQuery naming convention - jQuery tutorial for beginner.
- How to Select / Deselect All Checkboxes using jQuery.
How to Create A Basic Plugin In JQuery
Today in all web application, We use jQuery plugin like image slider, Date Picker, Table Plugin, Multiple Month Selector and Upload image through Ajax etc.
In our web application we use one OR more jQuery plugins.
jQuery Plugin creation is very simple and interesting once you can learn how to create. To be expert in jQuery plugin you must know the basic of HTML/HTML5/CSS/CSS3 and jQuery. When you start learning plugin, it seems difficult but after continue 1-2hour you will be start understanding and taking quite interest.
today, all web application use jquery plugin whether it is made in PHP OR ASP. Also if you are expert in jQuery and jQuery plugins you have excellent career as a UI developer. today most of MNC companies hiring UI developer because UI developer can handle all UI stuff whether web application is created in PHP or ASP.
So, Start enjoying the creation of jQuery plugin, trust me its quite easy just start with confidence.
Confidence is required in all the fileds....
Following plugins gives you max height/width of div.
Just Copy the Above code snippets and past in any html and access that html through Browser. Just look at once try to understand, you will start understanding.
In our web application we use one OR more jQuery plugins.
jQuery Plugin creation is very simple and interesting once you can learn how to create. To be expert in jQuery plugin you must know the basic of HTML/HTML5/CSS/CSS3 and jQuery. When you start learning plugin, it seems difficult but after continue 1-2hour you will be start understanding and taking quite interest.
today, all web application use jquery plugin whether it is made in PHP OR ASP. Also if you are expert in jQuery and jQuery plugins you have excellent career as a UI developer. today most of MNC companies hiring UI developer because UI developer can handle all UI stuff whether web application is created in PHP or ASP.
So, Start enjoying the creation of jQuery plugin, trust me its quite easy just start with confidence.
Confidence is required in all the fileds....
Following plugins gives you max height/width of div.
Div 1Div 2Div 3
Just Copy the Above code snippets and past in any html and access that html through Browser. Just look at once try to understand, you will start understanding.
Best Related Posts are Following:
- jQuery Ajax Interview Questions and Answers for Experienced.
- Jquery Interview Questions and Answers for experienced.
- How can I check DOM is ready in jQuery.
- How to add new row in existing table using jQuery.
- What is difference between event.preventDefault() and return false in Javascript?.
- How to Include a JavaScript file in another JavaScript file?.
- How can I get query string values in JavaScript and jQuery?.
- What is the Correct content-type of JSON and JSONP?.
- jQuery Mobile interview questions and answers.
- How to Add attribute in A-Tag using jQuery.
- Lightbox vs Fancybox.
- Firebase Chat with Facebook and Twitter Integration.
- jQuery datepicker first week monday.
- How to Create A Basic Plugin In JQuery.
- Difference between JSON and JSONP.
- jQuery Function with Examples.
- jQuery Fancybox.
- Ajax AutoComplete for jQuery.
- jQuery multi column sorting with jQuery - Live Demo.
- jQuery Autocomplete like Facebook With Demo.
- jQuery naming convention - jQuery tutorial for beginner.
- How to Select / Deselect All Checkboxes using jQuery.
Sunday 30 June 2013
jQuery Function with Examples
jQuery Functions with example which used mostly in web development
To use following functions you have to include jQuery file from jquery.com
.add() : Add elements to the set of matched elements. Example Add div to all p elements
.addBack() : Add the previous set of elements on the stack to the current set, optionally filtered by a selector. Example Add class "background" to all the "div" having class "after"
.after(): Insert content, specified by the parameter, after each element in the set of matched elements. Example Add the content "Test Message" just after "div" having "after" class
.ajaxComplete(): Register a handler to be called when Ajax requests complete. Example ajaxComplete will be called automatically just after finishing the ajax
.ajaxError(): Register a handler to be called when Ajax requests complete with an error. Example ajaxError will be called automatically just after finishing the ajax with error
.ajaxSend(): Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. Whenever an Ajax request is about to be sent, jQuery triggers the ajaxSend event. Any and all handlers that have been registered with the .ajaxSend() method are executed at this time. Example ajaxSend will be called automatically when ajax is about to be sent.
.ajaxStart(): Register a handler to be called when the first Ajax request begins. This is an Ajax Event. Whenever an Ajax request is about to be sent, jQuery checks whether there are any other outstanding Ajax requests. If none are in progress, jQuery triggers the ajaxStart event. Any and all handlers that have been registered with the .ajaxStart() method are executed at this time. Example ajaxStart will be called automatically when ajax request start
.ajaxStop(): Description: Register a handler to be called when all Ajax requests have completed. Example Whenever an Ajax request completes, jQuery checks whether there are any other outstanding Ajax requests. If none remain, jQuery triggers the ajaxStop event. Any and all handlers that have been registered with the .ajaxStop() method are executed at this time. The ajaxStop event is also triggered if the last outstanding Ajax request is cancelled by returning false within the beforeSend callback function.
.ajaxSuccess(): Attach a function to be executed whenever an Ajax request completes successfully. Example Whenever an Ajax request completes successfully, jQuery triggers the ajaxSuccess event. Any and all handlers that have been registered with the .ajaxSuccess() method are executed at this time.
.andSelf():Add the previous set of elements on the stack to the current set. Example This function has been deprecated and is now an alias for .addBack(), which should be used with jQuery 1.8 and later. As described in the discussion for .end(), jQuery objects maintain an internal stack that keeps track of changes to the matched set of elements. When one of the DOM traversal methods is called, the new set of elements is pushed onto the stack. If the previous set of elements is desired as well, .andSelf() can help. animate(): Perform a custom animation of a set of CSS properties. The .animate() method allows us to create animation effects on any numeric CSS property. The only required parameter is a plain object of CSS properties. This object is similar to the one that can be sent to the .css() method, except that the range of properties is more restrictive. Example
.contents(): Get the children of each element in the set of matched elements, including text and comment nodes. Given a jQuery object that represents a set of DOM elements, the .contents() method allows us to search throughthe immediate children of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .contents() and .children() methods are similar, except that the former includes text nodes as well as HTML elements in the resulting jQuery object.
To use following functions you have to include jQuery file from jquery.com
.add() : Add elements to the set of matched elements. Example Add div to all p elements
$("p").add("div")
.addBack() : Add the previous set of elements on the stack to the current set, optionally filtered by a selector. Example Add class "background" to all the "div" having class "after"
$("div.after").find("p").addBack().addClass("background");
.after(): Insert content, specified by the parameter, after each element in the set of matched elements. Example Add the content "Test Message" just after "div" having "after" class
$('div.after').after('Test Message');
.ajaxComplete(): Register a handler to be called when Ajax requests complete. Example ajaxComplete will be called automatically just after finishing the ajax
$(document).ajaxComplete(function(event,request, settings) { alert( "Request Complete." ); }); $( ".trigger" ).click(function() { $( ".result" ).load( "ajax/test.html" ); });
.ajaxError(): Register a handler to be called when Ajax requests complete with an error. Example ajaxError will be called automatically just after finishing the ajax with error
$(document).ajaxError(function(event, jqxhr, settings, exception) { alert( "Request Complete with Error." ); }); $( ".trigger" ).click(function() { $( ".result" ).load( "ajax/test.html" ); });
.ajaxSend(): Attach a function to be executed before an Ajax request is sent. This is an Ajax Event. Whenever an Ajax request is about to be sent, jQuery triggers the ajaxSend event. Any and all handlers that have been registered with the .ajaxSend() method are executed at this time. Example ajaxSend will be called automatically when ajax is about to be sent.
$(document).ajaxSend(function(event, jqxhr, settings) { alert( "Ajax Request just send" ); }); $( ".trigger" ).click(function() { $( ".result" ).load( "ajax/test.html" ); });
.ajaxStart(): Register a handler to be called when the first Ajax request begins. This is an Ajax Event. Whenever an Ajax request is about to be sent, jQuery checks whether there are any other outstanding Ajax requests. If none are in progress, jQuery triggers the ajaxStart event. Any and all handlers that have been registered with the .ajaxStart() method are executed at this time. Example ajaxStart will be called automatically when ajax request start
$(document).ajaxStart(function() { alert( "Ajax Request just send" ); }); $( ".trigger" ).click(function() { $( ".result" ).load( "ajax/test.html" ); });
.ajaxStop(): Description: Register a handler to be called when all Ajax requests have completed. Example Whenever an Ajax request completes, jQuery checks whether there are any other outstanding Ajax requests. If none remain, jQuery triggers the ajaxStop event. Any and all handlers that have been registered with the .ajaxStop() method are executed at this time. The ajaxStop event is also triggered if the last outstanding Ajax request is cancelled by returning false within the beforeSend callback function.
$( ".log" ).ajaxStop(function() { $(this).text( "Triggered ajaxStop handler." ); });
.ajaxSuccess(): Attach a function to be executed whenever an Ajax request completes successfully. Example Whenever an Ajax request completes successfully, jQuery triggers the ajaxSuccess event. Any and all handlers that have been registered with the .ajaxSuccess() method are executed at this time.
$(document).ajaxSuccess(function() { $( ".log" ).text( "Triggered ajaxSuccess handler." ); });
.andSelf():Add the previous set of elements on the stack to the current set. Example This function has been deprecated and is now an alias for .addBack(), which should be used with jQuery 1.8 and later. As described in the discussion for .end(), jQuery objects maintain an internal stack that keeps track of changes to the matched set of elements. When one of the DOM traversal methods is called, the new set of elements is pushed onto the stack. If the previous set of elements is desired as well, .andSelf() can help. animate(): Perform a custom animation of a set of CSS properties. The .animate() method allows us to create animation effects on any numeric CSS property. The only required parameter is a plain object of CSS properties. This object is similar to the one that can be sent to the .css() method, except that the range of properties is more restrictive. Example
$('a.clickMe').click(function() { $('#effect').animate({ width: 'toggle', height: 'toggle' }, { duration: 5000, specialEasing: { width: 'linear', height: 'easeOutBounce' }, complete: function() { $(this).after('Animation complete.');} }); });
.contents(): Get the children of each element in the set of matched elements, including text and comment nodes. Given a jQuery object that represents a set of DOM elements, the .contents() method allows us to search throughthe immediate children of these elements in the DOM tree and construct a new jQuery object from the matching elements. The .contents() and .children() methods are similar, except that the former includes text nodes as well as HTML elements in the resulting jQuery object.
Form Submit By Ajax - Simple Example
function submitme(){ var data= $('#form').serialize(); var url ="/ajax/submiturl"; $.ajax({ type: "POST", url: url, data: data, success: function(data){ alert(data); }, dataType: 'json' }); }
Best Related Posts are Following:
- Ajax technical interview questions and answers for experienced.
- Ajax Interview Questions and Answer for Experienced.
- Ajax Interview Questions and Answer for Experienced.
- Ajax Interview questions and answers for experienced.
- Synchronous XMLHttpRequest on the main thread is deprecated.
- Object Oriented Programming in PHP.
- Json Interview Questions And Answers For Freshers.
- Improve Ajax Performance.
- Firebase Chat with Facebook and Twitter Integration.
- Difference between JSON and JSONP.
- jQuery Function with Examples.
- jQuery Fancybox.
- jQuery Autocomplete like Facebook With Demo.
- jQuery naming convention - jQuery tutorial for beginner.
Sunday 15 July 2012
jQuery Fancybox
Is your need?
- Image in Popup
- Image Gallery in Popup
- Inline data in popup
- Ajax data in Popup
- Call callback function with popup
- Google Map in Popup
If above of anyone is your requirement, then this post is only for you.
Then solution is fancybox.net, it provide all the above features with jQuery.
Q What is Fancybox?
A fancyBox is a tool that offers a nice and elegant way to add zooming functionality for images, html content and multi-media on your webpages. It is built at the top of the popular JavaScript framework jQuery and is both easy to implement and a snap to customize.
Q. What Features it provide?
A. Following features it provide.
- Can display images, HTML elements, SWF movies, Iframes and also Ajax requests
- Customizable through settings and CSS
- Groups related items and adds navigation.
- If the mouse wheel plugin is included in the page then FancyBox will respond to mouse wheel events as well
- Support fancy transitions by using easing plugin
- Adds a nice drop shadow under the zoomed item
Best Related Posts are Following:
- How can I check DOM is ready in jQuery.
- How to add new row in existing table using jQuery.
- What is difference between event.preventDefault() and return false in Javascript?.
- How to Include a JavaScript file in another JavaScript file?.
- How can I get query string values in JavaScript and jQuery?.
- What is the Correct content-type of JSON and JSONP?.
- jQuery Mobile interview questions and answers.
- How to Add attribute in A-Tag using jQuery.
- Lightbox vs Fancybox.
- Firebase Chat with Facebook and Twitter Integration.
- jQuery datepicker first week monday.
- How to Create A Basic Plugin In JQuery.
- Difference between JSON and JSONP.
- jQuery Function with Examples.
- jQuery Fancybox.
- Ajax AutoComplete for jQuery.
- jQuery multi column sorting with jQuery - Live Demo.
- jQuery Autocomplete like Facebook With Demo.
- jQuery naming convention - jQuery tutorial for beginner.
- How to Select / Deselect All Checkboxes using jQuery.
Tuesday 6 September 2011
Ajax AutoComplete for jQuery
Question: What is Autocomplete?
The Autocomplete widgets provides suggestions words or strings without the user needing to type them in full;
For Example:
When you start type "auto" in google search, Its provides you list of suggestions like below:
"auto liker", "autocard", "autocar", "autocar india", etc
Question: How to add "auto complete" in cakephp?
In ajax autocomplete to add more than one value
You can use "tokens" like below
new Ajax.Autocompleter('id','upd', 'url', { tokens: ',' });http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter
Autocomplete, when added to an input field, enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.
Question: How to add "auto complete" in jQuery?
jQuery(document).ready(function() { //Autocomplete config jQuery("#FriendMyLocation").autocomplete('/autocompletes/index/City/name', {minChars:3}); });
List of config available in Autocomplete.
$.Autocompleter.defaults = { inputClass: "ac_input", resultsClass: "ac_results", loadingClass: "ac_loading", minChars: 1, delay: 400, matchCase: false, matchSubset: true, matchContains: false, cacheLength: 10, max: 100, mustMatch: false, extraParams: {}, selectFirst: true, formatItem: function(row) { return row[0]; }, autoFill: false, width: 0, multiple: false, multipleSeparator: ", ", highlight: function(value, term) { return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([^$()[]{}*.+?|\])/gi, "\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"); }, scroll: true, scrollHeight: 180, attachTo: 'body' };Download the Plugins From https://plugins.jquery.com/ui.autocomplete/
Best Related Posts are Following:
- How can I check DOM is ready in jQuery.
- How to add new row in existing table using jQuery.
- What is difference between event.preventDefault() and return false in Javascript?.
- How to Include a JavaScript file in another JavaScript file?.
- How can I get query string values in JavaScript and jQuery?.
- What is the Correct content-type of JSON and JSONP?.
- jQuery Mobile interview questions and answers.
- How to Add attribute in A-Tag using jQuery.
- Lightbox vs Fancybox.
- Firebase Chat with Facebook and Twitter Integration.
- jQuery datepicker first week monday.
- How to Create A Basic Plugin In JQuery.
- Difference between JSON and JSONP.
- jQuery Function with Examples.
- jQuery Fancybox.
- Ajax AutoComplete for jQuery.
- jQuery multi column sorting with jQuery - Live Demo.
- jQuery Autocomplete like Facebook With Demo.
- jQuery naming convention - jQuery tutorial for beginner.
- How to Select / Deselect All Checkboxes using jQuery.
Subscribe to:
Posts
(
Atom
)