jquery triggering not working in firefox extension

Steps to reproduce:

i created a hai.html and using pagemod i injected scripts into that, here is the code and that hai.html https://github.com/suneeshtr/trigger-test.git

Actual results:

injection of scripts and everything works fine except triggering. when i tried to append a file it works..

here is a part of code:

alert("content");
$(document).ready(function() {
var values = [{val:'santiagotactivos', meta:'Santiago Montero'},
{val:'johnnyhalife', meta:'Johnny Halife'},
{val:'arielflesler', meta:'Ariel Flesler'},
{val:'rbajales', meta:'Raul Bajales'}];
var customItemTemplate = "<div><span />&nbsp;<small /></div>";
function elementFactory(element, e) {
var template = $(customItemTemplate).find('span')
.text('@' + e.val).end()
.find('small')
.text("(" + e.meta + ")").end();
element.append(template);
};
alert(JSON.stringify($("textarea")));
// here is how we use it
$('textarea').sew({values: values, elementFactory: elementFactory});
});

Answers


try this one too:

http://www.hawkee.com/snippet/9391/

$('#inputbox').triggeredAutocomplete({
    hidden: '#hidden_inputbox',
    source: "/search.php",
    trigger: "@" 
});

your question is not clear you can try this example

    var src = [{val:'santiagotactivos', meta:'Santiago Montero'},
{val:'johnnyhalife', meta:'Johnny Halife'},
{val:'arielflesler', meta:'Ariel Flesler'},
{val:'rbajales', meta:'Raul Bajales'}];

    $("#auto").autocomplete({ 
        source:src
    });

Need Your Help

Range.Find.Execute - Forward only misbehave

c# .net ms-word office-interop

I'm using the .Net libraries for Microsoft Word 2010 interoping

JSON array deserialization is crashing the Dalvik VM

java android json gson

I have some code grabbing a JSON array from my server and initially storing it as a string. This all works fine until I try and deserialize it using google's gson fromJson method. LogCat spits out ...