I'm sure this one is super simple for a bunch of people, but I'm a bit
stuck.

I have a list of items (show listings) and when a user clicks on a
show, I want a map to slideDown and display a map of the location of
the show.

If the user clicks on another show, the map that is being shown slides
in, and the new one slideDown.
Very similar to an accordian, but my initial markup isn't as simple.

What I thought I could do was to just append the show listing with the
html to hold the map, and then call the slideDown function. But what i
have is just the whole map popping out.
I believe this is because I have to give the map a size before I can
show it (google map).

I've tried wrapping the map in another div and tried playing with the
height that wrapper div, but that didn't really work either.

Here's the code I've got working right now.
[code]
$(".show").livequery('click', function(event){
                $('a.active').removeClass('active');
                $('div.holdExtras').slideUp('slow').remove();
                $(this).addClass('active').slideDown('slow').append('<div
class="holdExtras"><div id="map2"></div><div id="holdQT">this holds
player</div></div>');
                });

[/code]

the slideUp & remove somewhat surprisingly works quite well, just the
slideDown is giving me some problems.

Thanks,
Pete

Reply via email to