Conflict on script ajax with others

164
April 17, 2018, at 10:58 AM

My script is causing conflict with others, when I use the line .noConflict (); it works fine, but another script stops working. If I remove the line .noConflict (); the script stops working and another script returns to normal. What can it be? I use https://code.jquery.com/jquery-3.2.1.slim.min.js after body is open.

$(function() {
    $("#contact .button").click(function() {
        var name = $("#form_name").val();
        var email = $("#form_email").val();
        var text = $("#msg_text").val();
        var dataString = 'name='+ name + '&email=' + email + '&text=' + text;
        $.ajax({
            type: "POST",
            url: "email_demo.php",
            data: dataString,
            success: function(){
                $('#success').fadeIn(1000);
            }
        });
        return false;
    });
});

I try this but not work

            a$.noConflict();
            a$(function() {
                a$("#contact .button").click(function() {
                    var name = $("#form_name").val();
                    var email = $("#form_email").val();
                    var text = $("#msg_text").val();
                    var dataString = 'name='+ name + '&email=' + email + '&text=' + text;
                    a$.ajax({
                        type: "POST",
                        url: "email_demo.php",
                        data: dataString,
                        success: function(){
                            a$('#success').fadeIn(1000);
                        }
                    });
                    return false;
                });
            });

my form:

<form name="solicitarDemo" method="post" class="" id="contact">  
 <section id="left">
   <label for="form_name">Name</label>
     <input name="form_name" id="form_name" type="text" >
   <label for="form_email">Email</label>
     <input name="form_email" id="form_email" type="email" >
 </section>
 <section id="right">
   <label for="form_msg">Message</label>
     <textarea name="form_msg" id="form_msg"></textarea>
   <input id="submit" class="button" name="submit" type="submit" value="Send">
 </section>
</form>
<div id="success" style="width:60%; display: none;">
Solicitação enviada, aguarde nosso contato em breve.
</div>

scripts:

<body>
        <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
        <!--  conflict with this script-->
        <script src="sliderPro/js/jquery.sliderPro.min.js"></script>
READ ALSO
Make Gif file play when user scrolls over and and stop afterwards

Make Gif file play when user scrolls over and and stop afterwards

I found this while browsing and this plays and stops gifts on hover:

123
Span Text change when a Radio Button is clicked

Span Text change when a Radio Button is clicked

Hey guys how can I change the text inside a span when a radio button is clickedThe text of the span would be the same as the value of the radio button

164
Target all a elements in a page using jquery

Target all a elements in a page using jquery

I've tried every combination/individual selector and cannot figure this one out

106