Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Fancybox-Plugin
#6
The FancyBoxConfig.js file from this plugin has the following code:
Code:
jQuery(document).ready(function() {
   jQuery('a#fb').fancybox({
       'hideOnContentClick': true
   });
   
   jQuery('a[rel]').fancybox();
   
});

Oleg's version adds iframe functionality and has the following code:
Code:
jQuery(document).ready(function() {
   jQuery('a.fb').fancybox({
       'hideOnContentClick': true
   });
   
   jQuery('a[rel]').fancybox();
   
});
jQuery(document).ready(function() {
$("a.iframe").fancybox({
       'autoScale'     : true,
       'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
});

When you change that to the following code, you will add inline text functionality:
Code:
jQuery(document).ready(function() {
   $('a.fb').fancybox({
       'hideOnContentClick': true
   });
   
   $('a[rel]').fancybox();
   
   $('a.inline').fancybox({
       'hideOnContentClick': true
       });
   
$("a.iframe").fancybox({
       'autoScale'     : true,
       'transitionIn' : 'none',
'transitionOut' : 'none',
'type' : 'iframe'
});
   
});
Also the code seems somewhat cleaner. Correct me if I made a mistake.

To make inline text work, you need the source view. There you add  id="example" to the <p> element of the text you want to show inline. Optionally, you can hide the text by default so that it will only show by clicking on the link with style="display:none; (this will also hide it in ckeditor though). Change "example" to what you want. Then you make a link with <a class="inline" href="#example"
Reply


Messages In This Thread
Fancybox-Plugin - by stwneu - 2015-07-23, 23:10:42
RE: Fancybox-Plugin - by datiswous - 2015-07-29, 09:01:34
RE: Fancybox-Plugin - by Oleg06 - 2015-07-29, 16:43:54
RE: Fancybox-Plugin - by datiswous - 2015-07-30, 12:00:47
RE: Fancybox-Plugin - by Oleg06 - 2015-07-30, 15:22:41
RE: Fancybox-Plugin - by datiswous - 2015-07-31, 00:23:54
RE: Fancybox-Plugin - by datiswous - 2015-07-31, 01:12:17
RE: Fancybox-Plugin - by Oleg06 - 2015-07-31, 02:19:49
RE: Fancybox-Plugin - by datiswous - 2015-07-31, 02:48:16
RE: Fancybox-Plugin - by shawn_a - 2015-07-31, 06:27:21



Users browsing this thread: 1 Guest(s)