• Hello,

    On NivoSlider I’m just trying to call the current image’s Title in the afterChange event:

    After some experimenting I can call the current slide’s number with this code:

    afterChange: function(){ var title = $('#slider').data('nivo:vars').currentSlide; alert("testing title variable: " + title + ""); }

    I’m using a JS alert box to test calling the variable.

    I’m aiming to add the current image’s title to this code so I can switch stylesheets on a slider change (I’m matching the title to the css file):

    afterChange: $('head').append('<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/colour-css/current title here.css" type="text/css" />');

    I need to call the image title from WordPress in the afterChange event but I’m really struggling. Can you help?

  • The topic ‘Nivo Slider onChange event help’ is closed to new replies.