Re: Sending Menu selection to an Iframe

Home Forums Older releases 0.9.x Sending Menu selection to an Iframe Re: Sending Menu selection to an Iframe

#1505
admin
Keymaster

Hi, here is one way to do it:

1) Set an id e.g. “iframe2” to your second iframe where the links should be loaded.

2) Add the following JS in your first iframe where the menu is:

$(function() {
	$('#main-menu').bind('select.smapi', function(e, item) {
		var iframe2 = parent.document.getElementById('iframe2');
		if (iframe2) {
			iframe2.src = item.href;
		}
		return false;
	});
});

That’s all and it would affect all your menu links.

Register

You will be emailed a link to set your password.

Login

Lost password?