View Single Post
Old 03-21-2012, 11:55 PM   PM User | #1
andyjason
New to the CF scene

 
Join Date: Mar 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
andyjason is an unknown quantity at this point
Trouble with links inside affected div

Hey all,

I'm doing an ajax website. When a link outside of the affected div is clicked on, then the ajax works, but if I click on a link inside the affected div, it doesn't. Please help. My js code's below:

Code:
             $(function () {
			if (window.location.hash){contentload(window.location.hash);}

			$('a').click(function() {
				fragment = this.hash;
				contentload(fragment);
			});
		});

		function contentload(fragment) {
			fragment = fragment.slice(1).replace('!', '')
			$('#divname').load('http://www.myurl.com');

		}
andyjason is offline   Reply With Quote