Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Can I make the navigator buttons images?

Re: Can I make the navigator buttons images? 1 year 6 months ago #96255

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • Thank you received: 5
  • Karma: 5
:side:
I'm afraid correcting the quotes (thank you) made no change.

The only thing I am changing s the path to the custom images as in:

if($("#movesubmitbtn").length>0 )
{
navigatorhtml=navigatorhtml+'<img class="alt-submitbtn" src="www.springboltconsulting.com/survey/uplo...v_custom2_normal.png" />';
}

The default navigator buttons are still present and functioning, but my images are no where to be found. Is it possible that my image path is somehow not correct? The images are certainly there on the survey, but perhaps the path has to be presented in a different way?
The administrator has disabled public write access.

Re: Can I make the navigator buttons images? 1 year 6 months ago #96256

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
Can you show a link to test it.

Please use javascript console, think there are some js bug.

Seeing your picture, it's really better with some css .....
The administrator has disabled public write access.

Re: Can I make the navigator buttons images? 1 year 6 months ago #96257

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • Thank you received: 5
  • Karma: 5
Here is a link to the survey: www.springboltconsulting.com/survey/index.php/785237/lang-en
I don;t know what javascript console is, but I will look into it.
David
The administrator has disabled public write access.

Re: Can I make the navigator buttons images? 1 year 6 months ago #96265

  • DenisChenu
  • DenisChenu's Avatar
  • OFFLINE
  • Moderator Lime
  • Posts: 6551
  • Thank you received: 869
  • Karma: 257
You have an erroir in the correctPNG function.

Remove it , and getfirebug.com/ :)
The administrator has disabled public write access.

Re: Can I make the navigator buttons images? 1 year 6 months ago #96293

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • Thank you received: 5
  • Karma: 5
Denis,
That did the trick. I got Firebug!
However, it the error didn't seem to be causing the images not to show up. I fixed the error by comparing to default template to see how the code should be fixed. But, in the end, I had to comment the entire CorectPNG function out in order to get the images to show.

Also, commenting that function out fixed an image preloading issue I was having as well that Tpartner was helping with in another post.

Thank you for the help and continuing advice. And Patience! I will remember it come the next campaign!
David
The administrator has disabled public write access.

Re: Can I make the navigator buttons images? 1 year 6 months ago #96297

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • 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.

Re: Can I make the navigator buttons images? 1 year 6 months ago #96321

  • tpartner
  • tpartner's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 4360
  • Thank you received: 827
  • Karma: 381
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.

LimeSurvey is open-source and run entirely by volunteers so please consider donating to support the project.
The administrator has disabled public write access.

Re: Can I make the navigator buttons images? 1 year 6 months ago #96323

  • dweisser
  • dweisser's Avatar
  • OFFLINE
  • Bronze Donor
  • Posts: 205
  • 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.130 seconds
Donation Image