I am trying to initialize some jQuery to only run if a specific querystring is found. However I am having trouble matching the querystring in an IF statement. My code is below.
$(document).ready(function(){
if($(window.location.search == '?uploaded=success')){
alert('test has worked');
}
});
At the minute this if statement is being ran whether ?uploaded=success is there or not. Can anyone help shed some light on this?