call jquery fom php script
<pre><code>&lt;script type="text/javascript"&gt;
    &lt;!--//
    // on DOM ready
    $(document).ready(function (){
        $("#current_rev").html("v"+$.jnotify.version);
        $("a.example").bind("click", function (e){
            // prevent default behavior
            e.preventDefault();

            var $ex = $($(this).attr("href")), code = $.trim($ex.text());

            // execute the sample code
            $.globalEval(code);
        });

        // style switcher
        $("button.css_switcher").click(function (){
            switchCSS(this.title);
        });
    });



    //--&gt;
    &lt;/script&gt;
</code></pre>

<p>Instead of using click events like <code>&lt;a href="#example-1" class="example"&gt;[Run]&lt;/a&gt; and &lt;a href="#example-2" class="example"&gt;[Run]&lt;/a&gt;</code></p>

<p>How can I call events if a condition is true or false?</p>

<pre><code>&lt;?php
if (true){
&lt;a href="#example-1" class="example"&gt;[Run]&lt;/a&gt;}else{
&lt;a href="#example-2" class="example"&gt;[Run]&lt;/a&gt;}
?&gt;
</code></pre>
