none
Jquery to vanilla js migration RRS feed

  • Question

  • Hi everyone,

    Can anyone came across migrating from jQuery to vanilla js in ASP.net applications. If so please let me know is there any tool or converter for migration. Any suggestions are welcomed. Please guide me what all needed to work on vanilla js.Is there any plugins or script file that can be downloadable and use it.Also please clarify is vanilla js and JavaScript both are same?

    Thanks,

    Himaja


    Thursday, May 6, 2021 9:16 AM

All replies

  • You should know what a library's functions are before you use it. Many times in jQuery are wrappers to existing ones that also compensate for how browsers interpret between different commands.

    You should be able to look up any methods you have in that block, and while you're there, read up on what may be different if you're using IE6 as opposed to Chrome.

    document.addEventListener("DOMContentLoaded", function(event) {

      var aboutme = document.getElementById('about').offsetTop;

      var project = document.getElementById('jobs').offsetTop;

      var contactme = document.getElementById('contact').offsetTop; 

    $('#btn-about').on('click', function(e){

            e.preventDefault();

            $('html, body').animate({

                scroll"ltr" style="line-height:1.38;margin-right:11pt;margin-margin-bottom:10pt;">        }, 500);

        });

        $('#btn-jobs').on('click', function(e){

            e.preventDefault();

            $('html, body').animate({

                scroll"ltr" style="line-height:1.38;margin-right:11pt;margin-margin-bottom:10pt;">        }, 500);

        });

        $('#btn-contact').on('click', function(e){

            e.preventDefault();

            $('html, body').animate({

                scroll"ltr" style="line-height:1.38;margin-right:11pt;margin-margin-bottom:10pt;">        }, 500);

        });




    Friday, May 7, 2021 1:33 PM