Front End, Programming

jQuery background panning in 10 lines of code

$('.panbg').mousemove(function(e){
 //Let's find the midpoints of the screen
 var midpointX = $(window).width()/2
 var midpointY = $(window).height()/2
 //Now the pointer's deviation as a percentage.
 var mousePosX = ((e.pageX-midpointX)/$(window).width())*100;
 var mousePosY = ((e.pageY-midpointY)/$(window).height())*100;
 //Let's dilute it by a factor of 40
 var xPos = mousePosX/40 + 50;
 var yPos = mousePosY/40 + 50;
 //Finally, let's move the background 🙂
 $('.panbg').css('backgroundPosition', xPos+'% '+ yPos+'%');
});
Standard
Domaining, Programming

Domain Lead Generator #3 – The Better Automated Process

This is the 3rd post of a series. If you haven’t read the previous posts, here they are :

Domain Lead Generator – Intro
Domain Lead Generator #1 – The Manual Process
Domain Lead Generator #2 – The Automated Process

In the previous post, I talked about the program introduced by the company and it’s flaws. Here, I’ll take you through how I made my own better version of the software Continue reading

Standard
Domaining, Programming

Domain Lead Generator #2 – The Automated Process

This is the 2nd post of a series. If you haven’t read the previous posts – here they are :

Domain Lead Generator – Intro
Domain Lead Generator #1 – The Manual Process

As you can observe – Once the keywords list is made, the other steps don’t involve much of human intelligence. Realizing this, a few guys at the company started working on a program that would automate this process. Continue reading

Standard