[jQuery] jMap Gray Box - Google logo, no joy

2009-03-09 Thread James S

Hello,

 While there are many posts on gr[ae]y boxes showing up, I've ruled
out a few of the obvious culprits and still can't get the map images
to show:

- I'm using a valid API key (can send geocode requests successfully)
- The dimensions of the element to be made a map are defined before
the call is made, and not changed.

 Things:

- I'm running a host of other plugins
(.ui, .tablesorter, .popupwindow, .form, .JSON, .livequery, .layout, 
.rightclick).
I have read of the potential for clashes but have run a simple page
with the same scripts included (but not used) and the map images load
as they should. Is this a conclusive test?

- The map is served within a series of ajax-loaded panes in the
document, a livequery listens for the map classed element to hit the
page and then calls .jmap on it

- Unfortunately, I'm unable to link to a sample (without a lot of
work) as it runs on a secure session, and contains sensitive customer
info.


 Feel a little out of my depth, any suggestions much appreciated.

 Cheers,

  James




[jQuery] Re: jMap Gray Box - Google logo, no joy

2009-03-09 Thread James S

A little extra to go on:

- When I comment out the main css file link, the map renders its
images but markers don't show and the viewport springs back to the
centre whenever the map is panned. There's nowt funky going on in the
css, and I can't identify any particular styles which cause the
problem.

I find it a little bizarre...


  James


[jQuery] Re: jMap Gray Box - Google logo, no joy

2009-03-09 Thread James S

A final clue:

- The css 'reset'
 *{position:relative;overflow:hidden;padding:0;}
seems to be causing the trouble. The page gets a little messed up
without it, but the map images do show (with map in it's odd, spring-
to-center state)

Go go fine minds of the internet ...

  James




[jQuery] Help : Difficulty binding event to selected jQuery object

2009-02-07 Thread James S

Dear jQuery,

 Can find plenty of discussion on the use of livequery but little on
binding problems which are less dynamic. If you could point out a nice
simple thing I'm overlooking then that would be great :)

Background:
As part of a UI I'm coding I serve a series of working panes. Content
is ajaxed into the pane and then livequeries pick out class flags from
the loaded content. One such flag is toolbar_button class which
signals to lift the element out and make it into a button on the
toolbar. Post relocation, toolbar html's something like:

==\/

div class=toolbar
div class=toolbar_buttonSave/div
div class=toolbar_button Cancel/div
div class=kill/div
/div

==/\

Along with the toolbar_button class flag, a second flag can be used
which clones the function of the button to a new button on the toolbar
(for stuff that has to be in place in the html to function - in this
case form buttons). These two types of toolbar button creation are
dealt with by the following jQuery:

==\/

$(.toolbar_button).livequery(function(){

p=parent_pane($(this)); // Finds the parent pane of the button 
so it
can be added to the correct toolbar

if($(this).hasClass('copy_me')){// If the page element 
needs to
stay in position, copy it to toolbar

p.children('.toolbar').prepend(div 
class='toolbar_button'
id='toolbar_button_target'+$(this).val()+/div);


$(.toolbar_button_target).css('color','red').click(function(e){
alert('This code is never run!');
}).removeClass('toolbar_button_target');


}else{ // Move it to the toolbar
p.children('.toolbar').prepend($(this).remove());
}
});

==/\

Buttons without the copy_me class are successfully transposed and
function as they should. However, when adding a copy of a copy_me
button the resulting object can be selected (the css() rule in the
code above turns it red) but doesn't respond to event binding. Click()
function as above doesn't work, nor other events.

I can't find any complication with event bubbling, nothing is stopping
the propagation.

I would be much obliged if someone with a greater insight could point
me right on this one.

Thanks,

  James