0

I've got this function:

$.urlParam = function(name){
            var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
            if (results==null){
                return null;
            }
            else{
                return results[1] || 0;
            }
        };

Fiddle

I put a ?param1 behind the URL but nothing is showing up, the firebug console doesn't say anything.

Can you guys help me?

Pete
  • 54,116
  • 25
  • 104
  • 150
Lydia Maier
  • 429
  • 2
  • 12

0 Answers0