English 中文(简体)
Jquery彩色采集器在接到亚克斯电话后没有工作
原标题:Jquery color picker not working after ajax call

在我的网站上,我增加了一个 j色彩色彩色盒,如:

http://www.eyecon.ro/colorpicker/

当通过亚克斯装满一页时,这名色列客没有工作。 这意味着彩色采集器在接到亚克斯呼吁后没有工作。

如何解决这一问题?

我的网址是《刑法》的一个识别网站:

这是我的索引页源代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title> Rock website</title>
<link href="<?php echo base_url();?>style/style_user_admin.css" rel="stylesheet" type="text/css" />

<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>style/jquery-jvert-tabs-1.1.4.css" />

<script type="text/javascript" src="<?php echo base_url();?>/js/ajaxupload.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/jquery-1.4.1.min.js"></script>

<script type="text/javascript" src="<?php echo base_url();?>js/colorpicker.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/eye.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/utils.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>js/layout.js?ver=1.0.2"></script>
<link rel="stylesheet" href="<?php echo base_url();?>css/colorpicker.css" type="text/css" />


<script type="text/javascript" src="<?php echo base_url();?>js/jquery-jvert-tabs-1.1.4.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>js/jquery.cleditor.css" />
<script type="text/javascript" src="<?php echo base_url();?>js/jquery.cleditor.js"></script>

<script type="text/javascript">
$(document).ready(function(){
    page_setup();
});
</script>

<script type="text/javascript">
    function page_setup()
    {
        $.ajax({  
                    type: "POST",  
                    url: "<?php echo base_url();?>index.php/super_admin/page_setup/",
                    success: function(msg){
                    //alert(msg);
                    $("#page_setup").html(msg).show();
                    }  
                });
    }
</script>
</head>

<body>
<div class="wraper">
<div class="welcome_to_admin">
Super Admin Panel
</div>
<div class="admin_main">
<div id="vtabs1">
    <div>
        <ul>
            <li><a href="#page_setup" onclick="return page_setup();">Page Setup</a></li>
        </ul>
    </div>
    <div>
        <div  id="page_setup">
            <!--
            load the page_setup.php page here
            -->
        </div>
    </div>
</div>
</div>
</div>
</body>
</html>

这是超级——行政控制员法:

public function page_setup()
    {
        $this->load->view( super_admin/page_setup );
    }

这是“编造”网页。

<div class="tab1_rgt_part">
<div class="message_to_send_11">Color Settings</div>
  <div class="tab1_main_part" style="margin-top:20px;">
  <div class="tab1_left_part">Welcome Page Bg Color</div>
<input type="text" maxlength="6" size="6" id="colorpickerField1" value="00ff00" />
</div>
问题回答

在装满了html后,尝试添加色体:

function page_setup()
    {
        $.ajax({  
                    type: "POST",  
                    url: "<?php echo base_url();?>index.php/super_admin/page_setup/",
                    success: function(msg){
                    //alert(msg);
                    $("#page_setup").html(msg).show();
                    $("#colorpickerField1").ColorPicker(
                     onChange: function (hsb, hex, rgb) {   
                        $(this).val(hex);
                     }
                    );
                    }  
                });
    }
    $( #colorpickerField1, #colorpickerField2, #colorpickerField3,#colorpickerField4).ColorPicker({
    onSubmit: function(hsb, hex, rgb, el) {
        $(el).val("#"+hex);
        //$(el).css("background-color","#"+hex);
        $(el).ColorPickerHide();
    },
    onBeforeShow: function () {
        $(this).ColorPickerSetColor(this.value);
    }
})

我找到答案。 在观察页顶端的文字标签上添加这一代码





相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

How can i update div continuously

I have asp.net application where i have a div which showing the value from other site. The value of that site is changing continuously. I want that my div will automatically update in some interval ...

热门标签