Re: More effects for slideshow

just checking doesnt that que the slider

Last edited by bigcobi (2010-10-25 10:12:18)

Thumbs up

Re: More effects for slideshow

Is your slider even working with the fade effect? I think one of the plugins you run is messing up the slideshow.

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

function kill_js() {

         wp_deregister_script( 'jquery-cycle' );

}
add_action( 'wp_print_scripts', 'kill_js', 100 );

function my_slideshow_js() {

if (is_home() || is_front_page() ) {
wp_enqueue_script('jquery-cycle-all', get_stylesheet_directory_uri() . '/js/jquery.cycle.all.js', 'jquery', null, true);
}
}

add_action('wp_print_scripts', 'my_slideshow_js');


function my_add_slideshow_js() {
?>
<script type="text/javascript">
jQuery(document).ready(function($) {

<?php if (is_home() || is_front_page()) : ?>
$('#featured-slideshow').cycle({
    fx: 'scrollHorz',
    speed: 250,
    next: '#controls .next',
    prev: '#controls .prev',
    timeout: 6000,
    pause: 1,
    slideExpr: '.featured-slideshow-inner',
    height: '<?php $size = arras_get_image_size('featured-slideshow-thumb'); echo $size['h']; ?>px'
});
<?php endif ?>
   
});
</script>
<?php
}
add_action('wp_footer', 'my_add_slideshow_js');

function my_slideshow_init() {

remove_action('wp_footer', 'arras_add_slideshow_js');

Thumbs up

Re: More effects for slideshow

It works just fine, right?

My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

extatix wrote:

It works just fine, right?

nope! I must be doing something real wrong

Thumbs up

Re: More effects for slideshow

Actually, it does work but not always. The old js is still loaded.

You are missing lines after this

function my_slideshow_init() {

remove_action('wp_footer', 'arras_add_slideshow_js');
My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

extatix wrote:

Actually, it does work but not always. The old js is still loaded.

You are missing lines after this

function my_slideshow_init() {

remove_action('wp_footer', 'arras_add_slideshow_js');

confused, what am I missing or I should put that somewhere?

Thumbs up

Re: More effects for slideshow

It should look like this:

function my_slideshow_init() {

remove_action('wp_footer', 'arras_add_slideshow_js');
}
add_action('init', 'my_slideshow_init');
My Arras themed & Arras related site: NullCore.
Please ask questions about Arras on forum, not through mail, thanks.

Re: More effects for slideshow

extatix wrote:

It should look like this:

function my_slideshow_init() {

remove_action('wp_footer', 'arras_add_slideshow_js');
}
add_action('init', 'my_slideshow_init');

got it thanks again

Thumbs up