Support » Plugin: Plugins » [Plugin: Plugins] Using colorbox in wordpress plugin

  • I have been using this code for writing a wordpress plugin. This plugin contains a colorbox. But this is not working. I can install plugin and can activate it successfully, but color box is not working. my code is

    <?php

    /*
    Plugin Name: abc
    Plugin URI: http://www.abc.com/
    Description: abc
    Author: abc
    Version: 1.0
    Author URI: http://www.abc.com
    */

    wp_enqueue_style(‘colorbox.css’, ‘\wordpress\wp-content\plugins\calc_plugin\colorbox.css’);

    wp_enqueue_script(‘jquery.js’);
    wp_enqueue_script(‘colorbox.js’, ‘\wordpress\wp-content\plugins\calc_plugin\colorbox.js’, array(‘jquery’));

    function calc_form_markup() {
    $markup = <<<EOT

    <script>
    $(document).ready(function(){
    $(“.inline”).colorbox({inline:true, width:”600″, height:”450″});
    });
    </script>

    <div style=’display:none’>

    <div id=’inline_content1′ style=’padding:10px; background:#fff;’>
    <p>This is inline content 1</p>
    <image src = “http://wallpaper.goodfon.com/image/240138-1360×768.jpg” width = “175” height = ” 150″>
    </div>

    </div>

    <p>Inline HTML</p>

    EOT;

    return $markup;

    }

    add_shortcode(‘calc_form’, ‘calc_form_markup’);

    ?>

    http://wordpress.org/extend/plugins/plugins/

  • The topic ‘[Plugin: Plugins] Using colorbox in wordpress plugin’ is closed to new replies.