+ Start a Discussion
Saad Ahmad 27Saad Ahmad 27 

Using jquery on Visualforce Page

I have some  code that was previously written for us for a visualforce page in our instance of SFDC. I'm just trying to get a better understanding of the following:
 
var vendor_category = $('.row-vendor-'+row_no).val();

Can someone help me understand what the above line does and where would I go about to find '.row-vendor' ?

Please let me know if there are any additional question. Thank you in advance for your help!!
Best Answer chosen by Saad Ahmad 27
Alain CabonAlain Cabon
Hi,

It is a selector of jQuery for classes.

https://api.jquery.com/class-selector/

You should find : class="row-vendor-1"     class="row-vendor-2"  in your source code probably.

The resolution of val() is explained here : https://api.jquery.com/val/#val

All Answers

Alain CabonAlain Cabon
Hi,

It is a selector of jQuery for classes.

https://api.jquery.com/class-selector/

You should find : class="row-vendor-1"     class="row-vendor-2"  in your source code probably.

The resolution of val() is explained here : https://api.jquery.com/val/#val
This was selected as the best answer
Saad Ahmad 27Saad Ahmad 27
Thanks, Alain. I was able to figure this out based on your advise.