Load different html content into two divs on one click event??
Hello all,
I am currently using load() to display content upon clicking a line. I would like to add another load function to the same anchor's click event. I tried applying the click function to the sam a.class but it did not work.
I have the load a.class within an accordion. here is my current jQuerry functions on the page
- $(document).ready(function() {
//ACCORDION BUTTON ACTION
$('div.accBtn').click(function() {
$('div.accContent').slideUp('normal');
$(this).next().slideDown('normal');
});
//HIDE THE DIVS ON PAGE LOAD
$("div.accContent").hide();
// Loading COntent via SubMenu //
$('#response').load('frags/services-frag.html #our-services');
$('#sidebar-response').load('frags/sidebar-frag.html #default');
$('a.loadNav').click(function() {
var loadUrl = 'frags/services-frag.html';
var loadCont = $(this).attr('id');
$('#response').load(loadUrl + ' #' + loadCont);
$('div.accBtn').click(function(){
$('div.active').removeClass('active');
$(this).addClass('active');
});
});//end a.loadNav click function
});
Any help is greatly appreciated!!!
Thanx