0

I want to get the URL parameter and split it using jQuery. When the URL parameter value and the current page URL value are not equal it should be redirected.

Code Sample

$(".heading a").attr("href", "http://pacificwebtechnology.com/Facebook?val="+ variable + "#form-fill");

$(document).ready(function(){
    alert("hai");
    function getUrlParameter(sParam) 
    {
        var sPageURL = window.location.search.substring(1);
        var sURLVariables = sPageURL.split('?');
        return sURLVariables;
    }​

    $var=getUrlParameter(val);

});
Keerthi
  • 117
  • 1
  • 2
  • 10

0 Answers0