Jump to content
Fórum Script Brasil
  • 0

Me ajudem com cycle


Tânia Rodrigues

Question

Boa noite colegas de fórum... Estou precisando muito da ajuda de vocês. Tenho que entregar um trabalho amanhã e o sslide de fotos criado com o cycle roda em todos navegodores, menos no Internet Explorer...

Já revirei os códigos... Vou colocar eles aqui, quem sabe vocês podem me dar alguma dica... Ficarei muiito grata.

// Cycle plugin config
jQuery(document).ready(function($){
    var baseURL = $('input.base-url').val();
    var c1TransitionType = "fade";
    var c1Speed = 1000;
    var c1Timeout = 5000;
    var c1Sync = 1;
    $.get(baseURL+"/wp-content/themes/u-design/sliders/cycle/cycle1/cycle1_params.php", function(theXML){
        $('settings',theXML).each(function(i){
            c1TransitionType = $(this).find("fx").text();
            c1Speed = parseInt($(this).find("speed").text());
            c1Timeout = parseInt($(this).find("timeout").text());
            c1Sync = parseInt($(this).find("sync").text());
        });
        /* homepage slider params */
        $('#c1-slider').cycle({
            fx:                 c1TransitionType,
            speed:              c1Speed,
            timeout:            c1Timeout,
            sync:               c1Sync,
            randomizeEffects:   0,
            prev:               '#slider-prev',
            next:               '#slider-next',
            pager:              '#c1-nav'
        });
        $('#c1-pauseButton').click(function() {
            $('#c1-slider').cycle('pause');
            return false;
        });
        $('#c1-resumeButton').click(function() {
            $('#c1-slider').cycle('resume', true);
            return false;
        });
    });
});
<?php
$root = dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))));
if ( file_exists( $root.'/wp-load.php' ) ) {
    require_once( $root.'/wp-load.php' );
} elseif ( file_exists( $root.'/wp-config.php' ) ) {
    require_once( $root.'/wp-config.php' );
}

$c1_slides_array = explode( ',', $udesign_options['c1_slides_order_str'] );
$transition_types_array = array();
foreach( $c1_slides_array as $slide_row_number ) {
    $transition_types_array[] = $udesign_options['c1_transition_type_'.$slide_row_number];
}
$transition_types_csv = implode(',', $transition_types_array);
$result = array(
fx  => $transition_types_csv,
speed  => $udesign_options['c1_speed'],
timeout  => $udesign_options['c1_timeout'],
sync  => ( $udesign_options['c1_sync'] ) ? 1 : 0
);
// create a new XML document
$doc = new DomDocument('1.0');
// create root node
$root = $doc->createElement( 'settings' );
$root = $doc->appendChild( $root );
foreach( $result as $param_name=>$param_value ){
    $child = $doc->createElement( $param_name );
    $child->appendChild(
$doc->createTextNode( $param_value )
    );
    $root->appendChild( $child );
    $doc->appendChild( $root );
}
// get complete xml document
$xml_string = $doc->saveXML();
header('Content-Type: application/xml; charset=ISO-8859-1');
echo $xml_string;
#c1-header {
    background-color: #FFF;
    display: block;
    float: left;
    position: relative;
    width: 100%;
    padding-bottom:10px;
}
#c1-header #header-content {
    padding-top: 25px;
}
#c1-header .c1-slideshow {
    position: relative;
    background-color: transparent;
    overflow: hidden;
    outline: none;
    width: 960px;
    height: 420px;
}
#c1-slider {
    background: transparent url(../../common-images/c1-frame.png) no-repeat scroll 50% 0;
    position: relative;
    list-style: none outside none;
    margin-left:auto;
    margin-right:auto;
    width:960px;
    height:420px;
}
#c1-slider li {
    background: none repeat scroll 0 0 transparent !important;
    width: 960px;
    overflow: hidden;
    margin: 0 auto;
    padding: 0;
}
.c1-slide-img-wrapper {
    padding: 23px;
    display: block;
    float: left;
}
#c1-slider .slide-desc h2 {
    font-size: 18px;
    margin-top: 5px;
}
#c1-slider .slide-img {
    float: left;
    margin: 0;
}
#c1-nav {
    padding: 5px 5px 0 0;
    margin: 0 auto;
    float:right;
    height:14px;
    position: relative;
}
#c1-nav a {
    background: url("../images/slider-bullet.png") no-repeat scroll 0 0 transparent;
    display: block;
    float: left;
    width: 14px;
    height: 14px;
    margin-right: 5px;
    text-indent: -9999px;
    border: 0 none;
    outline: 0 none;
}
#c1-nav a.activeSlide {
    background-position: -15px 0;
}
#c1-pauseButton {
     margin: 0 auto;
    height: 14px;
    float: right;
    position: relative;
}
#c1-pauseButton a {
    background: url("../images/slider-controls.png") no-repeat scroll 0 0 transparent;
    display: block;
    float: left;
    width: 14px;
    height: 14px;
    margin: 5px 5px 0 0;
    text-indent: -9999px;
    border: 0 none;
    outline: 0 none;
}
#c1-resumeButton {
    margin: 0 auto;
    height: 14px;
    float: right;
    position: relative;
}
#c1-resumeButton a {
    background: url("../images/slider-controls.png") no-repeat scroll 100% 0 transparent;
    display: block;
    float: left;
    width: 14px;
    height: 14px;
    margin: 5px 30px 0 0;
    text-indent: -9999px;
    border: 0 none;
    outline: 0 none;
}
#c1-shadow {
    background: transparent url(../../common-images/trans-shadow.png) no-repeat scroll 0 100%;
    width: 940px;
    height: 300px;
    margin: -307px auto 0;
}

Obrigada galera...

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...