I've been trying to do some research into this, but I haven't yet found anything related to this, so I've e here in hopes that someone might be able to point me in the right direction.
Is there any way at all that we can create our own HTML Elements?
I've seen a Custom ComboBox that was created using Javascript months back, but cannot find it anymore.
Basically, I'd like to create my own 'Control', that I can use for my pages. Maybe something that can be just 'plugged in' (although not a requirement). Any thoughts/ideas/advice/links?
Any help is really appreciated. Thank you!
I've been trying to do some research into this, but I haven't yet found anything related to this, so I've e here in hopes that someone might be able to point me in the right direction.
Is there any way at all that we can create our own HTML Elements?
I've seen a Custom ComboBox that was created using Javascript months back, but cannot find it anymore.
Basically, I'd like to create my own 'Control', that I can use for my pages. Maybe something that can be just 'plugged in' (although not a requirement). Any thoughts/ideas/advice/links?
Any help is really appreciated. Thank you!
Share Improve this question asked May 5, 2011 at 11:56 βӔḺṪẶⱫŌŔβӔḺṪẶⱫŌŔ 1,2963 gold badges18 silver badges33 bronze badges 4- 2 Have you looked at how jQuery UI guys do it? – Jan Hančič Commented May 5, 2011 at 12:03
- 1 Question seems a little broad. A custom control can be created using so many different methods. Creating divs, styling them, adding event listeners to mutate elements, add attributes, sending data. Without knowing exactly what "control" you want to create this question is too broad to answer. – Gary Green Commented May 5, 2011 at 12:13
- @Gary G - Yeah, I tried to make it as broad as possible. The reason being is that I'm not sure how many ways there are, and how I would go about it, so I didn't want to limit the question in any way. Re, "Control", Well, I guess, any type of input element. Like a Button, TextField, ComboBox, SplitButton etc. But again, I don't want to limit to just those controls. I'm not really after any specific control, just something that will lead me into the right direction, (even in just a single area), from there I can learn more – βӔḺṪẶⱫŌŔ Commented May 5, 2011 at 12:17
- @Jan Hančič - Thanks! I will check out the jQuery site. That didn't even occur to me! – βӔḺṪẶⱫŌŔ Commented May 5, 2011 at 12:18
1 Answer
Reset to default 3If you want to write a JQuery plug-in but don't know where to start, have a look at this site: http://stefangabos.ro/jquery/jquery-plugin-boilerplate
He's written a boilerplate code for a jquery plug-in, with plenty of ments explaining what to do and how to expand it. It should make a good starting point for you.