Showing posts with label Jquery. Show all posts
Showing posts with label Jquery. Show all posts

Wednesday, September 24, 2014

Content Editor Web Part Example (Writing Custom Web Part

The Content Editor Web Part (CEWP) allows you to add text, html, JQuery or styles to a SharePoint page. It is great to use this if you,

  1. Are good in JQuery or Javascript.
  2. Want to use Web Services, REST API (Introduced in SharePoint 2013) or ECMA script.
  3. Need One or two pages of customization and do not want to touch Visual Studio and going through process of uploading solutions.
  4. Do not have deployment permissions on Central Administration.

Add a Web Part to a page


1. From a page, in the ribbon, click the Page tab, and then click the Edit command.

Image: Edit command of the Edit tab

Friday, February 21, 2014

Create Simple Accordion with JQuery (Not JQuery UI)

Why not use JQuery UI accordion?

JQuery UI is more professional accordion and has too many options. But in my last project, I had to create accordion having different color coding on each heading background and other rendering options so i just created very very simple accordion.

I have created two Headings and for each heading i have provided class name "question" and for each detail, class name is "answer".When the page is opened first time, you can hide all the details by,   $('.answer').hide();this line can also be written in document.ready method.

Saturday, February 15, 2014

Setting Jquery UI Auto complete on SharePoint Text Filter

Steps,

1- Add Text Filter and List Web Part on the page.
2- Add connection between text filter and List webpart.
3- Open Notepad, Add following script in the Notepad.
4- Change the controlID variable value to the generated client id of Text Filter textbox.
5- Change the List and column names in the SP Service call.
6- Save the file in Site Asset library.
7- Add Content Editor web part on the page and provide link to the text file placed in the Site asset Library.

Enjoy:)