- Posts: 4
 - Thank you received: 0
 
Image Description as button text?
- 
        pedigopa
Inactive member - 
            
				
                            Topic Author
                                 - New Member
 - 
            
         
        Less
        More
        
            
    
        
            
        
                14 years 7 months ago                #5978
        by pedigopa
    
    
            
            
            
            
            
                                
    
                                                
    
        Image Description as button text? was created 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
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.
- 
        ivan.milic
Support Staff - 
            
				
                                 - Moderator
 - 
            
         
        Less
        More
        
            
    
        - Posts: 14116
 - Thank you received: 1639
 
            
        
                14 years 7 months ago                #5980
        by ivan.milic
    
    
    
            
            
            
            
                                
    
                                                
    
        Replied by ivan.milic on topic Re: Image Description as button text?            
    
        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
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.
        Time to create page: 0.145 seconds