Gallery page

More
13 years 10 months ago #5451 by ivan.milic
Replied by ivan.milic on topic Re: Gallery page
Hi , here is new script:

<script type="text/javascript">

jQuery(document).ready(function(){

var COLUMNS = 5;
var gal = jQuery('#gallery');

if(gal[0]){
gal.find('.clear').remove();
var TABLE = jQuery("<table class='gal_table' cellpadding='0' cellspacing='0' ></table>");
var row = jQuery('<tr></tr>');
var n = 0;

while(gal.children('a').length != 0)
{
n++;
var chld = jQuery(gal.children('a')[0]);
chld.remove();
var cell = jQuery("<td></td>");
cell.append(chld);
row.append(cell);
if(n == COLUMNS)
{
n = 0;
TABLE.append(row);
row = jQuery('<tr></tr>');
}
}

if(row.children().length > 0){
TABLE.append(row);
}
gal.html('');
gal.append(TABLE);
}
});

</script>


put it after this block:

<!-- top menu -->
<script type="text/javascript">
function mainmenu(){

jQuery(" #nav ul ").css({display: "none"}); // Opera Fix
jQuery(" #nav li ").hover(function(){
jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).fadeIn(700);
},function(){jQuery(this).find('ul:first').css({visibility: "hidden"}); });}
jQuery(document).ready(function(){ mainmenu();});
</script>


You can control css in tebale using:

.gal_table
{

}

.gal_table tr
{

}

.gal_table td
{

}

Please Log in to join the conversation.

  • canda13
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 10 months ago #5495 by canda13
Replied by canda13 on topic Re: Gallery page
excellent - awesome - outstanding!

many thanks for all your help

If you want a testimonial I will provide one for you

Regards,

Chris

Please Log in to join the conversation.

Time to create page: 0.113 seconds
Powered by Kunena Forum