Click here to Skip to main content
15,923,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi...I wrote one java script file and i want to create a plug in for that...but i dont know how to create plug in...
Any body please hel me...
Here i share my javascript ad plugin format...

Javascript

$(document).ready(function () {
$("ul li").click(function () {

//$("ul li").not($(this)).removeClass("active");
//$(this).addClass("active");
var ind = $(this).index();
$("#panel div").not($(this)).hide(); //panel is the id of my main div
$("#panel div:eq(" + ind + ")").show();
});
});

Plugin format




(function ($) {
$.fn.tabfunction = function () {
$("ul li").click(function () {
var ind = $(this).index();
$("#panel div").not($(this)).hide();
$("#panel div:eq(" + ind + ")").show();
});
}
}(jquery));



thanks in advance....
Posted
Comments
ZurdoDev 4-Dec-14 7:38am    
What exactly is your question?
Shivaram_i 4-Dec-14 7:42am    
Hi..thanks for giving response...I want to create plugin

1 solution

 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900