Uncategorized Archives | Codeexecute

Add existing project on Github by using commands

Simple steps to Add project on Github

//<strong>Step 1</strong> Initialize the local directory as a Git repository
$ git init

//<strong>Step 2</strong> Adds the files in the local repository and stage them for commit.
$ git add .
//to unstage a file use 'git reset HEAD YOUR-FILE'

//<strong>Step 3</strong> Commit the staged files of local repository.
$ git commit -m "First commit"

//<strong>Step 4</strong> Sets the new remote repository.
$ git remote add origin remote repository URL
//<strong>Step 4</strong> Verifies the new remote URL.
$ git remote -v

//<strong>Step 5</strong> Push the staged files of local repository in remote repository.
$ git push origin master

Detect Mousewheel events by jQuery

$(function () {
   var isChrome = !!window.chrome && !!window.chrome.webstore; //use to resolve browser compatibilty issue.
   var functionname="mousewheel.focal";
   $('Selector').bind(functionname, function{
	var delta = (isChrome) ? e.delta || e.originalEvent.wheelDelta : e.originalEvent.detail;
        if(isChrome && delta < 0){
	     //scroll down in chrome
        elseif(isChrome && delta > 0){
            //scroll up in chrome
        elseif(!isChrome && delta > 0){
            //scroll down in mozilla
            //scroll up in mozilla
	return false;