autocomplete works only with jQuery 1.2.6

Asked

Viewed 53 times

0

Well I am using an autocomplete plugin with 2 input, where I put the value in 1 input and the 2nd and filled. The problem is that my system works with jQuery 1.7.2, because I have several functions with it. And this auto complete only works with jQuery 1.2.6. How do I fix it?

Follows my code:

$().ready(function () {

        $("#singleBirdRemote").autocomplete("search.php", {
            width: 260
        });

        $("#singleBirdRemote").result(function (event, data) {
            if (data) {

                $(this).parent().find("input[@name=b]").val(data[1]);

            }
        });

    });
<input type="text" id="singleBirdRemote">

    <input name="a" >
    <input name="b" >
    <input name="c" >

  • 1

    You do not need "@" in the ! " input[name=b selector]"!

  • 1

    I could simply use the previous question http://answall.com/q/118778/42575

  • the problem was because of @vlw

  • puts the solution as an answer here for you to give the green "check".

2 answers

2


Playing back the comment:

You don’t need the "@" on the selector, just use

input[name=b]

0

The solution was to remove the @

$(this).parent().find("input[@name=b]").val(data[1]);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.