0
if ($(e.target).attr('id') != 'tabDiv'  && $(e.target).parents('div#tabDiv').length == 0 && serviceContainer.has(e.target).length === 0){
                $('#tabDiv').parent().parent().find("input[id$='_serviceName']").css('display', '')
                $('#tabDiv').parent().remove();
            }

I am getting the Uncaught TypeError: $(...).attr is not a function error. and visualforce page is not working properly. we have changed the Jquery library version from 2.2.4 to 3.4.1 currently. is this change causing the issue?

0

I think when changing from version 2 to 3, jquery has implemented closure and strict in library.

Try putting below line in first line of script:

var $ = jQuery.noConflict();
1

it worked. the error was in j$(window).load(function() {});. changed the code to j$(window).on("load", function() {}); according to the new jquery version library.also added jQuery.noConflict(); method and it worked fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.