Hello,
Please visit
http://osdatev26.nairvijay.com and see the block Newest Profile Pictures (second block)
This block display all new profile pictures for the selected gender. The block is defined as follows
THe outer div is the basic one with ID as
- <div id="newest_profpics" >
{include file="newest_profpics_display.tpl"}
</div>
THis is the one which gets updated by ajax process as the full block.
THe inner block is defined as
- <div style="height:100%; width:100%;">
- {var page_hdr01_text="{lang mkey='newest_profpics_hdr'}"|cat:$profpicshdr02}
- {include file="page_hdr01.tpl"}
- {var linkis="profpic" }
- <div class="module_detail_inside">
- <ul id="newestprofpics_carousel" class="jcarousel-skin-tango">
- {foreach item="item" key=key from=$profpicsusers}
- <li>
- <div style="padding-left:1px; padding-right:1px; width:100%;">
- {if $config.newest_profpics_display=='tiny'}
- {include file="smallest_profdisp.tpl"}
- {else}
- {include file="userresultviewsmall.tpl"}
- {/if}
- </div>
- </li>
- {/foreach}
- </ul>
- </div>
- </div>
THe php program populates everything properly. THe heading portion contains the select statement for the gender which has a class 'searchselect'.
Now I am using following plugins
Corners
select_skin
jcarousel.
THe rounded corners is working well albeit slight difference with the boarder pixel sizes.
THe select_skin is working in FF and Chrome after a gender is selected. But it applies the select_skin, but do not allow selection of gender after in IE8.
THe jcarousel is working in FireFox. IT loads data in Chrome but disables the PRev/Next buttons.
In IE8, it loads only first time and is not able to select.
If you can just see it, you can get the idea.
Now I have applied jquery as follows.
In the main index file I have,
- <script type="text/javascript" src="{$DOC_ROOT}javascript/jQuery/jquery-1.4.min.js" ></script>
- <script type="text/javascript" src="{$DOC_ROOT}javascript/jQuery/jquery.corners.min.js" ></script>
- <script type="text/javascript" src="{$DOC_ROOT}javascript/jQuery/jquery.select_skin.js" ></script>
- <script type="text/javascript" src="{$DOC_ROOT}javascript/jQuery/jquery.jcarousel.pack.js" ></script>
- <!--[if lt IE 8]>
- <script type="text/javascript" src="{$DOC_ROOT}javascript/IE8.js" ></script>
- <script type="text/javascript" src="{$DOC_ROOT}javascript/ie7-squish.js"></script>
- <![endif]-->
and applied jquery definition as
- <script type="text/javascript">
- $(document).ready(function(){
- $('.rounded').corners();
- $("select").select_skin();
- $('#newestprofpics_carousel').jcarousel({
- visible:4
- });
- $("#randomprof_carousel").jcarousel({
- visible:4
- });
- $("#newestprofiles_carousel").jcarousel({
- visible:4
- });
- $('#iplocation_prof_carousel').jcarousel({
- visible:4
- });
- $('#featuredprofiles_carousel').jcarousel({
- visible:4
- });
- $('#recentactiveprofiles_carousel').jcarousel({
- visible:4
- });
- })
- </script>
I have defined ajax loading as
- var osDatehtt
- function osDatehandleResponse()
- {
- if (osDatehttp.readyState == 4) {
- if (osDatehttp.status == 200) {
- var response = osDatehttp.responseText;
- if (response != 'undefined' && response != '') {
- if (response.indexOf('|||') != -1) {
- var update = response.split('|||');
- for (var i = 1; i<update.length; i++) {
- if (update[i] != 'undefined' && update[i] != '') {
- var up2 = update[i].split('|:|');
- if (up2[0] != 'undefined' && up2[0] != ''
- && document.getElementById(up2[0])) {
- var fld = "#"+up2[0];
- $(fld).html(up2[1]);
- afterLoads(up2[0]);
- }
- }
- }
- }
- }
- }
- }
- }
- function afterLoads(sect){
- if (sect == 'newest_profpics') {
- $('#newestprofpics_carousel').jcarousel({
- visible:4
- });
- $('#newest_profpics .searchselect').select_skin();
- $('#newest_profpics .rounded').corners();
- };
- }
I have done this way as .bind and .live failed to update. THe funniest part I noticed is in Chrome, the loading function
osDatehandleResponse() is being executed twice which may be effecting the prev/next keys. In Fire Fox, everything is working well. In IE8, the select_list is getting applied but stops from selecting further.
One more thing I noticed in IE8. If I change the afterLoads() function as
- function afterLoads(sect){
- if (sect == 'newest_profpics') {
- $('#newest_profpics .searchselect').select_skin();
- $('#newestprofpics_carousel').jcarousel({
- visible:4
- });
- $('#newest_profpics .rounded').corners();
- };
- }
This gives the size error in jcarousel, but displays properly.
I really appreciate any inputs and guidance to solve this issue.
Thanks