0

In this bit of code, how can I modify the style of 'TEXT'?

}).text('TEXT').appendTo('body');

This is part of a longer code. TEXT is a link, when you click on it images open in fullscreen (it's part of galleria). However, the TEXT doesn't behave as a link (ie. no hover effect etc.), it is only defined by body { } in the CSS file.

How can I add the appropriate CSS class?

Thanks a lot!

And the full code:

<script>

 Galleria.loadTheme('galleria/themes/classic/galleria.classic.js');
Galleria.run('#galleria');

 $('<a>').click(function(e) {

Galleria.configure({trueFullscreen:false});
Galleria.ready(function(){this.enterFullscreen();});

  }).text('Switch to fullscreen').appendTo('body');

</script>

1 Answers1

1

.text('Switch to fullscreen').appendTo('body').css("color","blue").hover(function() {$(this).css("color","violet");}, function() {$(this).css("color","blue");});

Just add this jquery chain with your code. css adds style to the object and hover function is called when you enter and leave the text.

Karthik

Ilya Ivanov
  • 23,148
  • 4
  • 64
  • 90
Karthik Ar
  • 125
  • 6