Skip to content Skip to sidebar Skip to footer

Pass Specific Data Value From Div To Javascript In Laravel 5.0?

My view as separate divs(square) , made by given integer from database .This is front end view.I want when i click this div pass , it code(roomID) to JavaScript function. This is

Solution 1:

JavaScript ReferenceError is not defined

I believe this happens due to the conflict between various JS libraries included in your project and their dependencies with each other:

Your options:

1) Please check if all the JS lib's are loaded in proper order

2) Add a wrap around function to escape undefined values

if((typeof varName) != 'undefined') {
   alert(varName);        
}

Ex: jQuery lib should be called first and then all the dependent JS libs.

In most cases and easy fix would be make a call to noConflict() to restore the variable.

Add $.noConflict(); just above the document ready in script.

A good reference docs

Hope this is helpful.

Post a Comment for "Pass Specific Data Value From Div To Javascript In Laravel 5.0?"