Wednesday, May 2, 2012

Beginning Object Oriented Programming | Part 1

What Is OOP System.

Object Oriented Programming Language is basically a set of rules and concepts which makes it easy to understand and manage. Class's , inheritances , constructor, destructor, abstractor class are the concept provided by OOPS.

Class :- 
        In case of OOPS a Class is a collection of Data Member (Variables, Properties ) and  Member Function (Called Function or Methods). Data members are used to store the Information where member function are used to operate the Data Member's. In case of  PHP member of classes have friendly accessifier , however one can define the explicitly with one of the these Access- modifier:-
  1. Private :- The members which one defined  as private keyword , only accessible within the class, No one can access them outside of the Class , even Object of the Class.
  2. Public:- The member which one are defined as  Public Keyword can be accessed within  a Class and outside of the Class. Those member function can be accessed with object of that class or with class name depends upon access-modifier. 
  3. Protected:-   Protected member function like as private member but protect functions  can be inherited one level down while private are not.
Syntax For the Class :-


class <class name >
{
Public $datamember; // In this section we can defile data member as Private, Public or Protected.

public function <function name(method)>
               {
          //code to operate the data member's goes here.
               }



}



To be Continued .........Objects

Tuesday, May 1, 2012

jQuery Selectors

jQuery Selectors

Here are some great and easy jquery selector .

1: How to find all the the elements of a web Page.


<script type="text/javascript">

// ('*') is used for all the element of a web page.


var count=$('*').length;
alert(count);

// ('p') It will count all the P tag of a web page.

var count=$('p').lenght;
alert(count);



// ('#idname') It will count all the tag within this element. For example #idname is a div and have 4 element //inside it. then this selector will count element inside this only.


var count=$('#idname').lenght;
alert(count);



</script>