antiblock
https://i.imgur.com/aJ17bf7.gif
  • Chatbox

    You don't have permission to chat.
    Load More
Sign in to follow this  
xXBoyDarkXx

Função Jquery

3 posts in this topic

Boas preciso da vossa ajuda, eu não precebo muito de jquery e precisava que alguém me fizesse uma função que fizesse o seguinte: Eu tenho uma selectbox e queria que se escolhesse um determinado item da selectbox me aparecesse 2 textbox.

 

Obrigado

Share this post


Link to post
Share on other sites
antiblock
Elveron
$("#country_id").selectbox({
    onOpen: function (inst) {
        //console.log("open", inst);
    },
    onClose: function (inst) {
        //console.log("close", inst);
    },
    onChange: function (val, inst) {
        $.ajax({
            type: "GET",
            data: {country_id: val},
            url: "ajax.php",
            success: function (data) {
                $("#boxCity").html(data);
                $("#city_id").selectbox();
            }
        });
    },
    effect: "slide"
});
$(".nova").selectbox({
    effect: "fade"
});
$("#vehicle_id").selectbox({
    speed: 400
});

 

É disto que estás à procura ?

Share this post


Link to post
Share on other sites

não era bem isso xD mas eu já consegui obrigado na mesma

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this