Note that there are some explanatory texts on larger screens.

plurals
  1. POusing color box in a wordpress plugin
    primarykey
    data
    text
    <p>I am developing a wordpress plugin in which i need to implement colorbox. I have the following code. Plugin works perfectly but the color box is not working. I have copied same colorbox code to an html file and its working. the only problem is in the wordpress plugin. Either i am not importing js and css exactly or any thing other is going wrong. Need help in urgent.</p> <pre><code>&lt;?php /* Plugin Name: my plugin Plugin URI: http://www.xxx.com/ Description: xxx Author: xxx Version: 1.0 Author URI: http://www.xxx.com */ wp_enqueue_style('colorbox.css', '\wordpress\wp- content\plugins\calc_plugin\colorbox.css'); wp_enqueue_script('jquery.js', '\wordpress\wp-content\plugins\calc_plugin\jquery.js', array('jquery1')); wp_enqueue_script('colorbox.js', '\wordpress\wp- content\plugins\calc_plugin\colorbox.js', array('jquery2')); function calc_form_markup() { $markup = &lt;&lt;&lt;EOT &lt;script&gt; $(document).ready(function(){ $(".inline").colorbox({inline:true, width:"600", height:"450"}); }); &lt;/script&gt; &lt;div style='display:none' &gt; &lt;div id='inline_content1' style='padding:10px; background:#fff;'&gt; &lt;p&gt;&lt;strong&gt;This is inline content 1&lt;/strong&gt;&lt;/p&gt; &lt;image src = "http://wallpaper.goodfon.com/image/240138-1360x768.jpg" width = "175" height = " 150"&gt; &lt;/div&gt; &lt;/div&gt; &lt;p&gt;&lt;a class='inline' href="#inline_content1"&gt;Inline HTML&lt;/a&gt;&lt;/p&gt; EOT; return $markup; } add_shortcode('calc_form', 'calc_form_markup'); ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload