Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I want to build a wrapper web part which will have properties. These properties must be consumed by jQuery functions and support its consumer webpart. Can we do this?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

jQuery runs entirely client side, so it can consume anything which ends up in the markup of the page. It doesn't matter what you add to properties on the development side if those properties aren't available in the page client side.

Keep in mind that you can also use jQuery's AJAX function to query SharePoint's Web Services or read any URL-accessible file, though I don't think that helps you here.

share|improve this answer
    
thanks buddy, In fact i don't want to use webservice for now. can we do this then? say i have created wrapper webpart which having the properties. in each property i added a inline jquery functions as per our requirement. and i register jquery on client side using ClientResgistredScript object. so would that works ? I want something like this jquerywebparts.codeplex.com –  Red Swan Jul 5 '11 at 9:13
    
It sounds like what you're describing would work. I'd give it a go. –  Marc D Anderson Jul 5 '11 at 14:01
    
Thanks again, but i gone through few url's where author suggested to add the reference of jquery file in the master page. but in this (which i given in my last comment)...the reference of .js files added in the Assembly.config file using attribute. i could not get the difference between both. is i need to do any one out of these both ways? –  Red Swan Jul 6 '11 at 4:58
    
I'm not sure I understand your last question, but I almost always simply put the jQuery reference in my master page using a plain old <script> tag. There are multiple ways to accomplish this, and your deployment methods should have more of an impact tha others' opinions. –  Marc D Anderson Jul 7 '11 at 3:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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