Friday, 6 September 2013

How to Create A Basic Plugin In 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.
<script> 
/** create a jQuery plugin **/
jQuery(document).ready(function(){ 
    jQuery.fn.maxHeight=function(){ 
        var max =0; 
        this.each(function(){ 
            max = Math.max(max, jQuery(this).height()); 
        });     
        return max;  
    }; 

    jQuery.fn.maxWidth=function(){ 
        var max_width =0; 
        this.each(function(){ 
            max_width = Math.max(max_width, jQuery(this).width());                   
        });             
        return max_width; 
    };     
     
});
/** create a jQuery plugin **/


/** How to use a jQuery plugin **/
jQuery(document).ready(function(){
  //alert('Max Height: ' + jQuery('div').maxHeight());
  //alert('Max Width: ' + jQuery('div').maxWidth());
});
/** How to use jQuery plugin **/
 
</script>
<div>
Div 1</div>
<div>
Div 2</div>
<div>
Div 3</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.


Thursday, 22 August 2013

What is SSL

SSL(Secure Sockets Layer)- It enables browsers to transmit data to and from a web server in a secure cryptographic way to make life hard for third party spies monitoring all internet traffic. When websites pages open with https(https://www.facebook.com) we have to install the SSL in our server. When we install SSL, we have to create the certificate (you have to pvoide some detail like countryCode, state, name, email etc during SSL created).


SSH (Secure Shell)-it enables a networked computer one to provide access to a shell on networked computer two. The user can have a level of confidence that spies listening to the insecure channel cannot decrypt data sent between the networked computer(s).


FTP(File Transfer Protocol)- Its protocol (rule) that is used when we need to tranfer a file from one location to another location(One server to another server).


SFTP(Secure File Transfer Protocol)-"FTP over SSH" uses the regular old FTP protocol, but an SSH tunnel is placed between client and server.


HTTPS (Hypertext Transfer Protocol Secure)- You have to install SSL Certificate to run your web pages as https





Question: cURL extension has to be loaded to use this, This error is coming when use run php through CLI, Its working fine when Running through browser. I am working on WampServer in window7. 



Answer: WAMP uses different php.ini files in the CLI and for Apache(Browser). when you enable php_openssl through the WAMP server, you enable it for Apache, not for the CLI. You need to modify C:\wamp\bin\php\php-5.5.x\php.ini to enable it for the CLI.