[Mapbender-dev] using jquery ...

Marc Jansen jansen.marc at gmx.de
Mon May 14 10:35:21 EDT 2007

Michael Schulz schrieb:
> Hi,
> I remember from the mapbender dev meeting, that there were some
> caveeats using the jquery library, since it is loaded through a
> seperate iframe. Marc you pointed out a solution how to handle this
> problem. My goal is to use jquery in another module iframe. 

Hi Michael,

you might try to map the jQuery functions:

e.g. the normal frame where you load jquery.js is called 'jquery_loader'

in another frame you can call jquery functions like this (untested, the 
referencing of the document, wher jquery lives is surely wrong ;-)):

if (typeof window.frames['jquery_loader'].window.jQuery != 'undefined') {
  var imported_$ = window.frames['jquery_loader'].window.jQuery;
} else {
  alert('this seems to be a wrong reference...');

you can then do something like this:

var my_links = imported_$('div.test a').find('span').each(function(i) {

Good luck....

> At the
> moment I reference it twice (in jquery.html and in my module), that's
> not how it's supposed to be.
> Anybody already done a slider zooming control (jQuery/interface)? I'd
> be happy to share thoughts on this (e.g. functionality, customization,
> etc.)
> Cheers, Michael

More information about the Mapbender_dev mailing list