• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

82
Views
function Invalid left-hand side in assignment

I'm trying to learn JQuery and I got this error. Invalid left-hand side in assignment I'm trying to point the selector without using any events function.

        let a = $("td:contains('"+ word +"')") = function(){
            $(this).closest('tr').hide();
            $(this).closest('tr').wrap('<hidden>');
            state = true;
        }         
        a();
almost 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The error likely lies in this part:

$("...")=function(){...}

$("...") already returns an object, so you can't assign a function() to it.

From your code, I guess what you want may be this:

let a=(function(){...}).bind($("..."));

a();
almost 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error