Jump to content


Bibi Kuhn

Member Since 18/11/2010
Offline Last Active 05/01/2012, 13:54
-----

Topics I've Started

Ajuda Para Executar Uma Função De Tempo Em Tempo

03/11/2011, 16:59

Oi pessoal,

Quero alterar esse Código para que a função execute a cada 5 segundos(por exemplo) e não só quando no clique


$('#bannerNum a').bind('click', function() {
        var id = this.id;
        $('#bannerNum a').css('color', '#333333');
        $(this).css('color','#C51015');
        $('.banner img').css('zIndex', 1);
        $('.banner #banner'+id).css('zIndex', 9999);
		

    });

Como Adicionar A Função Setinterval Neste Código

03/11/2011, 14:00

Oi pessoal,


Estou tentando adaptar esse Código, mas não obtive Sucesso.

O que quero fazer é o seguinte:
Ele esta abrindo a função com um click, mas quero que ela funcione também com intervalo de tempo (a cada 5 segundos a função executa), porque quero fazer transação de imagem.


Ai vai a parte do Código que quero alterar

$.fn.jqTransSelect = function(){
return this.each(function(index){
var $select = $(this);

if($select.hasClass('jqTransformHidden')) {return;}
if($select.attr('multiple')) {return;}

var oLabel = jqTransformGetLabel($select);
/* First thing we do is Wrap it */
var $wrapper = $select
.addClass('jqTransformHidden')
.wrap('<div class="jqTransformSelectWrapper"></div>')
.parent()
//.css({zIndex: 10-index})
;

/* Now add the html for the select */
$wrapper.prepend('<div><span></span><a href="#" class="jqTransformSelectOpen"></a></div><ul></ul>');
var $ul = $('ul', $wrapper).css('width',$select.width()).hide();
/* Now we add the options */
$('option', this).each(function(i){
var oLi = $('<li><a href="#" index="'+ i +'">'+ $(this).html() +'</a></li>');
$ul.append(oLi);
});

/**/

/* Add click handler to the a */
$ul.find('a').click(function(){
$('a.selected', $wrapper).removeClass('selected');
$(this).addClass('selected');
/* Fire the onchange event */
if ($select[0].selectedIndex != $(this).attr('index') && $select[0].onchange) { $select[0].selectedIndex = $(this).attr('index'); $select[0].onchange(); }
$select[0].selectedIndex = $(this).attr('index');
$('span:eq(0)', $wrapper).html($(this).html());
$ul.hide();
return false;

});



/**/
/* Set the default */
$('a:eq('+ this.selectedIndex +')', $ul).click();
$('span:first', $wrapper).click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});
oLabel && oLabel.click(function(){$("a.jqTransformSelectOpen",$wrapper).trigger('click');});
this.oLabel = oLabel;

/* Apply the click handler to the Open */
var oLinkOpen = $('a.jqTransformSelectOpen', $wrapper)
.click(function(){
//Check if box is already open to still allow toggle, but close all other selects
if( $ul.css('display') == 'none' ) {jqTransformHideSelect();}
if($select.attr('disabled')){return false;}

$ul.slideToggle('fast', function(){
var offSet = ($('a.selected', $ul).offset().top - $ul.offset().top);
$ul.animate({scrollTop: offSet});
});
return false;
})
;

// Set the new width
var iSelectWidth = $select.outerWidth();
var oSpan = $('span:first',$wrapper);
var newWidth = (iSelectWidth > oSpan.innerWidth())?iSelectWidth+oLinkOpen.outerWidth():$wrapper.width();
$wrapper.css('width',newWidth);
$ul.css('width',newWidth-2);
oSpan.css({width:iSelectWidth});

// Calculate the height if necessary, less elements that the default height
//show the ul to calculate the block, if ul is not displayed li height value is 0
$ul.css({display:'block',visibility:'hidden'});
var iSelectHeight = ($('li',$ul).length)*($('li:first',$ul).height());//+1 else bug ff
(iSelectHeight < $ul.height()) && $ul.css({height:iSelectHeight,'overflow':'hidden'});//hidden else bug with ff
$ul.css({display:'none',visibility:'visible'});

});
};


Brigadão!

Como Posso Chamar Uma Class="" No Flash (Actionscript)

18/11/2010, 16:24

Oi,

Sou nova aqui e nova na área tb.

Estou desenvolvendo uma galeria em Flash(bem simples com scroll e apertar nas setas e tal), pq a galeria q tinha pego não estava rodando um IE e não achei uma igual....

a questão é a seguinte: No site, quando clicar nas imagens em miniatura precisa abrir um lightbox (que eu ja tenho e q ta separado do flash da galeria).

O que eu fiz. Trasformei as imagens em botão e mandei abrir

on (release) {

getURL("imagem_2_700px.jpg" );

)

Tudo certo, mas ainda precisa abrir o light box que antes abria assim :

<a href="images/fotos/imagem_7_700px.jpg" class="pirobox_gall" title="Imagem1">

Ou seja a class="pirobox_gall" abri o lightbox....

Então, qual é a função que abre uma class no action de modo à lincala com a getUrl

on (release) {

getURL("imagem_2_700px.jpg" );

)

IPB Skin By Virteq