Oh, that makes more sense.  Don't even need to do anything special to
make it activate - just M-x jquery-here RET
$("h1").css("backgroundColor", "blue"); RET and the headings turn blue
:-)

function jquery_this_doc(d, js_code) {
    var script_el = d.createElementNS(XHTML_NS, "script");
    script_el.setAttribute("language", "javascript");
    script_el.setAttribute("type", "text/javascript");
    script_el.setAttribute("src",
"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js";);
    d.body.appendChild(script_el);
    script_el = d.createElementNS(XHTML_NS, "script");
    script_el.textContent = js_code;
    d.body.appendChild(script_el);
}

interactive("jquery-here",
            "load jquery.js into this page, then your command",
            function(I) {
                jquery_this_doc(I.buffer.document, (yield 
I.minibuffer.read($prompt
= "jq: ", $history = "jquery-here")));
            });
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to