Image Description as button text?

  • pedigopa
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 10 months ago #5978 by pedigopa
Is it possible to set the Image Description text as the button text in place of "1," "2," "3," etc.?

I have created my own button style to use and it would be awesome if I could have the description text display instead of a number. I have found the code that generates the button, but I have no idea how to change what is displayed as the text.

Thanks for any info.
Andy

Please Log in to join the conversation.

More
13 years 10 months ago #5980 by ivan.milic
Hi,

here is one hint:

Open modules/mod_hot_image_slider/js/scripts.js

Add something as this to beginning of that file;

var MyButtonsHTMLArray = new Array();
MyButtonsHTMLArray[0] = "My button html 1";
MyButtonsHTMLArray[1] = "My button html 2";
MyButtonsHTMLArray[2] = "My button html 3";
...


Then locate this line:

jQuery('#slide-nav').append('<a id="slide-link-' + i + '" href="#" onclick="slider.slide(' + i + ');return false;" onfocus="this.blur();">' + (i + 1) + '</a>');

Change the script I marked red to this:
MyButtonsHTMLArray
The following user(s) said Thank You: pedigopa

Please Log in to join the conversation.

  • pedigopa
    Inactive member
  • Topic Author
  • New Member
  • New Member
More
13 years 9 months ago #6007 by pedigopa
Thanks for the info. This worked perfectly!

Please Log in to join the conversation.

Time to create page: 0.149 seconds
Powered by Kunena Forum