Create a Custom Control using Javascript - javascript

I've been trying to do some research into this, but I haven't yet found anything related to this, so I've come 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!

If 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 comments explaining what to do and how to expand it. It should make a good starting point for you.

Related

To change group image(what's the _calcBounds() do?)

When we want to change the src,we can use setElement().
The Example such like
`https://jsbin.com/lowuqezofu/1/edit?html,js,output`
It changes when we click the button at the bottom.
But when I add the image to the group like
`https://jsbin.com/xerureviwe/edit?html,js,output`
I want to use _CalcBounds() to update the group,but it runs error.
So I find the other document to solve it.
Here is the people who have related questions on it.
Because I haven't see this function on official tutorial of website.
I think I may not make some mistake.
If we don't need addWithUpdate() or removeWithUpdate() just set image src,is this method can do update function we want?
If not,is there any alternative to do this way?
Thanks for others view the question.
However,I haven't find the suitable solution yet.
I use addWithUpdate() and removeWithUpdate() stupidly instead of using _calcbounds() which function I don't really understand.
It's not a good answer indeed.
But non-perfect solution can solve our problem,that's enough.
Thanks everyone again and please forgive my poor English.

Open Javascript code in editor on click

I am trying to create an interactive tutorial for learning an API. I've been googling my options for an entire day now. I came across ace, code mirror etc. but I'm not sure how I can use them in my case.
What I wish to do is that when the user clicks a button, a javascript code linked to it should open up in an editor on the same webpage. This would aid the users to see how the code is working and give them scope to modify and learn.
I know its not a constructive question but any help is appreciated! Thanks!
you can just wantch here how it is done
They made it with knockout MVVM but you can use angular or anything else you like.
I used tags to store my code and displayed it using codemirror's setValue property mentioned by #georg.

AJAX and Javascript: suggestions about an interface

I am looking for a correct method to create something very similar to this (just click Next on that page). I would love to receive any suggestions on how this has been made.
I believe that it's all about a DIV wrapping many ul's. When next is clicked, probably a jQuery code is showing an hidden DIV on the right, but wouldn't know how to position it. Everything clearly must be taken from a database.
Can anyone out there give me an advice? I hope this is not the kind of a thumbs-down question, as I tought this community would have been the best place to share this. Thanks a lot.
Take a look at some existing JavaScript MVC frameworks like Backbone.js, AngularJS, or Knockout, to understand some of the design patterns and philosophies behind these kinds of dynamic UIs.
They can be powerful for tools for a modern web app, especially when you have a lot of moving parts in your UI. They'll play well with your backend and datastore via AJAX, and you get nice features like "routing" which can help you do cool things with page flow, all the while keeping your JavaScript clean and concise.

Auto-Complete Hints for Javascript and Jquery in Coda 2

Does anybody know of a way to get auto-complete for javascript in Code 2?
Coda to is really helpful and is really good with this especially in CSS and html.
But when it comes to javascript or using jquery it doesn't seem to show me the methods or functions.
It is really helpful in CSS where it shows you all the different options. I there is no possible way to do this in Coda 2 are there any applications that you would recommend that are really good at this?
Hopefully you have found it already, but in case others stumble onto this, take a look here:
https://github.com/rayman813/coda2-mode-jquery

Implementing a simple feedback form in JS

How do I implement the feedback form that the following sites have?:
http://foodoro.com/
http://www.heyzap.com/
(look at the left center.)
Thanks!
You should probably checkout the JQuery or similar library for this sort of effect. There are heaps of great tutorials and plug-ins out there.
I would use this code in github
https://github.com/lorenzoongithub/getsomefeedback
as a template / boilerplate.
It should be quite easy to adapt to your requirements.
Start by looking into jQuery. It's pretty nice for stuff like this.
http://www.webdesignerwall.com/tutorials/jquery-tutorials-for-designers/
The first example on there shows a simple way to at least get a sliding panel. It's not exactly what you want but it gives you an idea of what jQuery can do and maybe how you'd achieve what you want.
Edit: Here's a direct link to the sliding panel demo on there...
http://www.webdesignerwall.com/demo/jquery/simple-slide-panel.html

Categories