hi folks,

i'm using jquery().hide() in block left sidebar, when i load the page the 
jquery behaviour is not expected (not hidden the object) in the left 
sidebar, when i'm not using the block left_sidebar it works fine (hidden 
the object). is there a way to make jquery behave as usual when using block 
left_sidebar (hidden the object)?
thank you so much in advance

e.g. behaviour is not expected (not hidden the object)
*contact_us.html*
{{left_sidebar_enabled=True}}

{{block left_sidebar}}
{{include 'default/left_sidebar.html'}}
{{end}}

{{extend 'layout_default.html'}}

{{=form}}

*left_sidebar.html*
{{rows=db(db.branch).select()}}

{{for i,row in enumerate(rows):}}
{{full_address=row.address+', '+row.city+', '+row.country}}
{{=SPAN(A(full_address, _title=T('View Maps'), _target='_blank', 
_href='http://maps.google.com/maps?f=q&hl=en&geocode=&time=&date=&ttype=&q=%s' 
% full_address), _id='address_%s' % i)}}
{{=DIV(A(IMG(_src='http://chart.apis.google.com/chart?cht=qr&chs=100x100&chl=http://maps.google.com/maps?f=q&hl=en&geocode=&time=&date=&ttype=&q=%s&choe=UTF-8&chld=H'
 
% full_address, _alt='QR Code Address', _title='QR Code Address'), 
_target='_blank', 
_href='http://maps.google.com/maps?f=q&hl=en&geocode=&time=&date=&ttype=&q=%s' 
% full_address), _id='qr_address_%s' % i)}}
{{=DIV(row.zip_code)}}
{{=SPAN(T('Phone : '), ', '.join(row.phone), _id='phone_%s' % i)}}
{{=DIV(XML(' 
'.join([DIV(IMG(_src='http://chart.apis.google.com/chart?cht=qr&chs=100x100&chl=tel:%s&choe=UTF-8&chld=H'
 
% phone, _alt=T('QR Code %s') % phone, _title=T('QR Code %s') % 
phone)).xml() for phone in row.phone])), _id='qr_phone_%s' % i)}}
{{if row.fax:}}
    {{=DIV(T('Fax : '), ', '.join(row.fax))}}
{{else:}}
    {{=BR()}}
{{pass}}
{{=SPAN(T('Email : '), XML(', '.join([A(email, _title=T('Send to %s') % 
email, _target='_blank',
        _href='mailto:%s' % email).xml() for email in row.email])), 
_id='email_%s' % i)}}
{{=DIV(XML(', 
'.join([DIV(A(IMG(_src='http://chart.apis.google.com/chart?cht=qr&chs=100x100&chl=%s&choe=UTF-8&chld=H'
 
% email, _alt=T('QR Code %s') % email, _title=T('QR Code %s') % email), 
_target='_blank', _href='mailto:%s' % email)).xml() for email in 
row.email])), _id='qr_email_%s' % i)}}

<script>
jQuery(document).ready(function(){
    jQuery('{{='#qr_address_%s' % i}}').hide();
    jQuery('{{='#qr_phone_%s' % i}}').hide();
    jQuery('{{='#qr_email_%s' % i}}').hide();
    jQuery('{{='#address_%s' % 
i}}').mouseover(function(){jQuery('{{='#qr_address_%s' % 
i}}').slideToggle()});
    jQuery('{{='#phone_%s' % 
i}}').mouseover(function(){jQuery('{{='#qr_phone_%s' % 
i}}').slideToggle()});
    jQuery('{{='#email_%s' % 
i}}').mouseover(function(){jQuery('{{='#qr_email_%s' % 
i}}').slideToggle()});
});
</script>
{{pass}}

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to