0

そのため、jQuery TextEditor を CodeIgniter プロジェクトにインストールしようとしています。なぜ機能しないのだろうと思っていました。ところで: 私のプロジェクトも Bootstrap を使用しています。プラグインが機能しない理由を教えてもらえますか? ファイルは既に適切な場所にあるので、ブラウザがファイルを見つけられなかったからではないと思います。助けてください。

頭:

<head>
<meta charset="utf-8">
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<?php echo base_url()?>css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="<?php echo base_url()?>css/bootstrap-responsive.min.css" rel="stylesheet" type="text/css">
<link href="<?php echo base_url()?>css/custom-style.css" rel="stylesheet" type="text/css">

<link type="text/css" rel="stylesheet" href="<?php echo base_url()?>css/jquery-te-1.4.0.css">

<script type="text/javascript" src="http://code.jquery.com/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript" src="<?php echo base_url()?>js/jquery-te-1.4.0.min.js" charset="utf-8"></script>


<style>
    .input-mysize{
        width:700px;
    }

    .textarea-mysize{
        width:700px;
        height:300px;
    }
</style>

</head>

私のテキストエリア:

<form method="post" action="#">
                        <table border="0" width="100%">
                            <tr align="center">
                                <th><input class="input-mysize" type="text" name="c_title" cols="100"/></th>
                            </tr>
                            <tr align="center">
                                <td><textarea name="textarea" class="jqte-test"></textarea></td>
                            </tr>
                            <tr>
                                <td align="center" colspan="2">
                                    <input type="submit" value="Update Content"/>
                                    <input type="reset" value="reset"/>
                                </td>
                            </tr>
                        </table>
                    </form>

Textarea のクラスは、jQueryTE のデモ ページにあったので、「Jqte-test」と呼ばれます。彼らがどのようにそれを機能させたのか、私には理解できません。すべての回答は大歓迎です。

4

1 に答える 1

1

.jQte-testjQueryプラグインでテキストエリアを初期化していないようです。

$(document).ready();追加する必要があります$(".jqte-test").jqte();

<script>
 $(document).ready(function(){
       $(".jqte-test").jqte();
  });
</script>

実装のヒントについては、プラグインのドキュメントをご覧ください。

http://jqueryte.com/documentation

于 2013-08-24T11:26:58.593 に答える