.click() after page load
===

I am trying url persistence for the first time, and after a page load, I have the elements that I want to click from the URL.  When I load the page, the .click() does not register, but if i type it in the console, it performs correctly.   I have tried placing the code(specifically the `(function persistence(formvals){...})();`) in the (document).ready(function(){...}) section, but that did not work.  How do I get the .click() to register AFTER the page load, and on each element that should be clicked?

url: [http://specialorange.org/resume/index.html?gc_abstract_heading&gc_ba_analysis][1]

the two ids of these sections are :
`gc_abstract_heading` and `
gc_ba_analysis`, so `$(gc_abstract_heading).click()` in the console works, just not in the code.

code:

    var formvals = {};
    var keyval = location.search.replace('?', '').split('&');
	$.each(keyval, function () {
		var splitval = this.split('=');
		formvals[splitval[0]] = splitval[1];
	});
	console.log(keyval);
	console.log(formvals);

	(function persistence(formvals) {
		for ( i=0 ; i < keyval.length ; i++ ) {
			console.log(keyval[i]);			
			$(keyval[i]).click();
		};
	})();


Please note that this code is not on the live page, it is on my local site for testing.  The persistence section on the live page is different.

  [1]: http://specialorange.org/resume/index.html?gc_abstract_heading&gc_ba_analysis