Hi,

looks like you are running into racing-conditions.
Why are you creating your list elements and bind the click event
handler in two different and ASYNCHRONOUS functions initial_list() and
site_details() ?

Add you site_details() functionality to your initial_list() function
just before the scroll_pane() call. You can still encapsulate the
functionality in a function, just call it directly (in a
        synchronously way).

e.g.
var initial_list=function(){
        $.get('data.php.xml',function(data){
                $(data).find('site').each(function(){
                        ...
                })
                site_details(data);
                scroll_pane()
                return
        })
        return
}
var site_details=function(data){
        $('#sites ul li').bind('click',function(){
                var index=$('#sites ul li').index(this)
                ...


by(e)
Stephan


2009/2/6 precar <pranshua...@gmail.com>:
>
> Thanks James.
>
> I actually had semicolons placed properly but after I ran the code
> through a JavaScript code cruncher online they were all removed.  I
> suppose I could try putting them back in, although like you said,
> that's probably not the problem.
>
>
> On Feb 6, 1:43 pm, James <james.gp....@gmail.com> wrote:
>> This probably won't help much, but personally I think it's a good
>> habit to put semi-colon (;) at the end of your lines in your JS code.
>> It will help reduce possible errors.
>>
>> On Feb 6, 8:33 am, precar <pranshua...@gmail.com> wrote:
>>
>>
>>
>> > I've tried using Firebug for debugging but since there's nothing
>> > technically wrong in the script, I can't get much out of it.  Is there
>> > a way to use Firebug for debugging something that's not broken but
>> > isn't functioning like you want it to?
>>
>> > On Feb 6, 11:27 am, precar <pranshua...@gmail.com> wrote:
>>
>> > > Could I get some help on this please?
>>
>> > > Thank you,
>> > > Precar.
>>
>> > > On Jan 30, 8:52 am, precar <pranshua...@gmail.com> wrote:
>>
>> > > > Hi,
>>
>> > > > Yes, I'm using the bind() method with 'click'.  Is that the correct
>> > > > approach?
>>
>> > > > Precar.
>>
>> > > > On Jan 28, 9:47 am, amuhlou <amysch...@gmail.com> wrote:
>>
>> > > > > It looks like it's not appending the "selected" class to the li
>> > > > > onClick in IE7.  Are you using the bind() method to apply the click
>> > > > > functionality?
>>
>> > > > > On Jan 28, 10:34 am, precar <pranshua...@gmail.com> wrote:
>>
>> > > > > > Hi,
>>
>> > > > > > My site (http://pthesis.com) works fine in Firefox/Opera/Safari, 
>> > > > > > but
>> > > > > > inIE7 there is a small hitch.  Sometimes when I click the portfolio
>> > > > > > link and open it, the links to the sites in the left column aren't
>> > > > > > clickable.  If I close it and re-open it, they work, and if I do
>> > > > > > "Refine by category" and then click, they work.
>>
>> > > > > > As I mentioned, this only happens inIE7.  I've tested inIE8 beta 2
>> > > > > > and it works fine.
>>
>> > > > > > Does anyone have any suggestions for a workaround?  If it would be
>> > > > > > helpful I'll post the page code here, or you may view it directly 
>> > > > > > from
>> > > > > > the site.
>>
>> > > > > > Thanks for your help,
>> > > > > > Precar.- Hide quoted text -
>>
>> > > > > - Show quoted text -- Hide quoted text -
>>
>> > > > - Show quoted text -- Hide quoted text -
>>
>> > > - Show quoted text -- Hide quoted text -
>>
>> - Show quoted text -

Reply via email to