Title: [Plugin: jQuery Colorbox] Stop displaying full javascript code in page source
Last modified: August 19, 2016

---

# [Plugin: jQuery Colorbox] Stop displaying full javascript code in page source

 *  [JamesBB](https://wordpress.org/support/users/jamesbb/)
 * (@jamesbb)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-jquery-colorbox-stop-displaying-full-javascript-code-in-page-source/)
 * Hello,
 * I was wondering if there is any way we can remove the following from the page
   source and put it in an external file?
 * _<!– jQuery Colorbox 3.4 | by Arne Franken, [http://www.techotronic.de/](http://www.techotronic.de/)–
   >
    <script type=”text/javascript”> // <![CDATA[ jQuery(document).ready(function(
   $) { $(“a:has(img):not(.colorbox-off)”).each(function(index, obj) { if ($(obj).
   attr(“href”).match(/\.(?:jpe?g|gif|png|bmp)/i)) { var $nestedElement = $(obj).
   children(0); if ($nestedElement.is(“img”)) { var $nestedElementClassAttribute
   = $nestedElement.attr(“class”); var $groupId = $nestedElementClassAttribute.match(‘
   colorbox-[0-9]+’) || $nestedElementClassAttribute.match(‘colorbox-manual’); if(
   $groupId && !$nestedElementClassAttribute.match(‘colorbox-off’)) { $groupId =
   $groupId.toString(); if ($groupId == “colorbox-manual”) { $groupId = “nofollow”;}
   $(obj).colorbox({ rel:$groupId, title:$nestedElement.attr(“title”), maxWidth:”
   95%”,maxHeight:”100%”,slideshow:true, opacity:”0.85″, transition:”elastic”, speed:
   650, slideshowSpeed:2500, close:”close”, next:”next”, previous:”previous”, slideshowStart:”
   start slideshow”, slideshowStop:”stop slideshow”, current:”{current} of {total}
   images” }); } } } }); }); // ]]> </script> <!– jQuery Colorbox 3.4 | by Arne 
   Franken, [http://www.techotronic.de/](http://www.techotronic.de/) –>
 * Thank you!
    Jamy
 * [http://wordpress.org/extend/plugins/jquery-colorbox/](http://wordpress.org/extend/plugins/jquery-colorbox/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [techotronic](https://wordpress.org/support/users/techotronic/)
 * (@techotronic)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-jquery-colorbox-stop-displaying-full-javascript-code-in-page-source/#post-1533454)
 * Hi James,
 * yeah, I thought about that a few times already… I also do not like to put the
   CSS for the Internet Explorer workarounds directly into the HTML.
 * I’ll change all that in one of the next versions.
 * Caveat: for that to work, every user has to set a subdirectory of the plugin 
   to be writable by the plugin…
 * Cheers,
    Arne
 *  Thread Starter [JamesBB](https://wordpress.org/support/users/jamesbb/)
 * (@jamesbb)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-jquery-colorbox-stop-displaying-full-javascript-code-in-page-source/#post-1533455)
 * **THANK YOU** very much Arne for your quick answer!
 * You always react very quickly and it is much appreciated.
    Will contact you soon
   for donation. Thanks again,
 * James

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: jQuery Colorbox] Stop displaying full javascript code in page
source’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [JamesBB](https://wordpress.org/support/users/jamesbb/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/plugin-jquery-colorbox-stop-displaying-full-javascript-code-in-page-source/#post-1533455)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
