Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:
  • Page:
  • 1
  • 2

TOPIC: Can I make the navigator buttons images?

Can I make the navigator buttons images? 3 years 2 months ago #96297

  • dweisser
  • dweisser's Avatar
  • Offline
  • Gold Lime
  • Posts: 222
  • Thank you received: 5
  • Karma: 5
I know I'm now just being annoying, but...
how would someone who knows what they're doing implement the hover (and the cursor decoration in css.

/* #movenextbtn img */

.alt-nextbtn:hover {
background: url('www.springboltconsulting.com/survey/uplo...xt_custom2_hover.png');
background-repeat:no-repeat;
}

I've tried about 30 combinations and am unable to make it work. Am I a lost cause?
Nebraska
The administrator has disabled public write access.

Can I make the navigator buttons images? 3 years 2 months ago #96321

  • tpartner
  • tpartner's Avatar
  • Online
  • LimeSurvey Team
  • Posts: 6127
  • Thank you received: 1360
  • Karma: 535
You can't really use CSS for the image source because you are manipulating an actual image, not something with a background image.

Add this to the end of template.js to replace the source of the image on hover:
$(document).ready(function() { 
	$('#alt-nextbtn').hover(
		function () {
			$(this).attr('src', 'http://www.springboltconsulting.com/survey/upload/templates/EagleGroupDemo/next_custom2_hover.png');
		},
		function () {
			$(this).attr('src', 'http://www.springboltconsulting.com/survey/upload/templates/EagleGroupDemo/next_custom2_normal.png');
		}
	);
 
});

Now, for the cursor, add this to template.css:
#alt-nextbtn {
	cursor: pointer;
}
Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The administrator has disabled public write access.

Can I make the navigator buttons images? 3 years 2 months ago #96323

  • dweisser
  • dweisser's Avatar
  • Offline
  • Gold Lime
  • Posts: 222
  • Thank you received: 5
  • Karma: 5
Your solution works perfectly. Ahh, thank you both so much for your help.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: ITEd
Time to create page: 0.208 seconds
Imprint                   Data Protection Statement                  Revocation information and revocation form