Bienvenue, Invité
Nom d'utilisateur : Mot de passe : Se souvenir de moi
  • Page :
  • 1
  • 2

SUJET : Can I make the navigator buttons images?

Re: Can I make the navigator buttons images? il y a 1 an 2 mois #96255

  • dweisser
  • Portrait de dweisser
  • Hors ligne
  • Bronze Donor
  • Messages : 196
  • Remerciements reçus 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?
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Can I make the navigator buttons images? il y a 1 an 2 mois #96256

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6205
  • Remerciements reçus 787
  • Karma: 238
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 .....
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Can I make the navigator buttons images? il y a 1 an 2 mois #96257

  • dweisser
  • Portrait de dweisser
  • Hors ligne
  • Bronze Donor
  • Messages : 196
  • Remerciements reçus 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
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Can I make the navigator buttons images? il y a 1 an 2 mois #96265

  • DenisChenu
  • Portrait de DenisChenu
  • Hors ligne
  • Moderator Lime
  • Messages : 6205
  • Remerciements reçus 787
  • Karma: 238
You have an erroir in the correctPNG function.

Remove it , and getfirebug.com/ :)
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Can I make the navigator buttons images? il y a 1 an 2 mois #96293

  • dweisser
  • Portrait de dweisser
  • Hors ligne
  • Bronze Donor
  • Messages : 196
  • Remerciements reçus 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
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Can I make the navigator buttons images? il y a 1 an 2 mois #96297

  • dweisser
  • Portrait de dweisser
  • Hors ligne
  • Bronze Donor
  • Messages : 196
  • Remerciements reçus 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
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Can I make the navigator buttons images? il y a 1 an 2 mois #96321

  • tpartner
  • Portrait de tpartner
  • Hors ligne
  • LimeSurvey Team
  • Messages : 4054
  • Remerciements reçus 740
  • Karma: 341
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.
L'administrateur a désactivé l'accès en écriture pour le public.

Re: Can I make the navigator buttons images? il y a 1 an 2 mois #96323

  • dweisser
  • Portrait de dweisser
  • Hors ligne
  • Bronze Donor
  • Messages : 196
  • Remerciements reçus 5
  • Karma: 5
Your solution works perfectly. Ahh, thank you both so much for your help.
L'administrateur a désactivé l'accès en écriture pour le public.
  • Page :
  • 1
  • 2
Modérateurs: ITEd
Temps de génération de la page : 0.177 secondes
Donation Image