I am looking for a library that would create a "settings panel" with configurable amount of sliders, checkboxes, etc and add it to a website. After a slider or checkbox is changed in the panel, a callback function would be executed.
Rationale: I am building a canvas demo and I don't want to spend time on writing my own set of controls for configurable parameters. I want to outsource this job to a small library that does it right.
I saw such thing few months ago but I cannot find it now.
Finnaly I found what I was talking about back then:
dat.gui is a cool JavaScript ilbrary that gives you a control panel
for manipulating variables and calling functions in your code. It’s
lightweight and simple to implement – just a few lines of code.
demos
jQueryUI provides some helpful UI elements, such as slider. For checkboxes you can use event callbacks
Related
I have a gallery page with four different sections: art, tattoo, info and gallery. The first image of each is displayed in a DIV called imageWrap when the headings are clicked, while the arrow icons (visible on section highlight) cycle through the images and notes via variables which reference a number of arrays.
I want to make the arrow buttons reference the correct variable set dependending on which section is active. Is there a way to listen for the current gallery state and modify the action listeners to handle the correct variable?
The page with the issue is located here:
www.christopherwynne.com/tattoo
I am still fairly new at Java, and any insight would be greatly appreciated.
Well i suggest you learn some Javascript Basics to develop more attractive webpages, i don't think java work on here for doing.
if you don't know anything about Javascript i leave you this resource
Javascript its sexy
JSIS give you the best resource to learn property JS, also give you another tutorials for learn some others frameworks like Meteor
Also if you say "i don't have time to learn JS i need my tattoo web page and the gallery image working" take a look on this page
Codrops Images Galley
Its very easy to adapt to the current web and look pretty nice
Hope it helps
I'm going through a pretty amazing ruby on rails course. Just a second ago I learned about flash hashes that show a message after some action has been performed.
Obviously, you can apply styling to it and what have you, but I wonder if there are ready-to-go javascript snippets out there that, in the case of flash hashes, would slide in for a second, and then disappear? (much like the stackoverflow message bar that appears up top)
I don't know if learning rudimentary javascript is something I'd want to do right now (maybe later, I need to stick with one thing) so I was wondering if there was some resource that is known for ready to go scripts like that?
Merci :)
This is not exactly what you asked for but the jQuery and jQuery UI libraries provide a fair number of animation effects that you might find useful.
jQuery UI effect() demos - you can also view the source to see how it's being done.
jQuery effects - in particular, you might be interested in fadeIn() and fadeOut(). Again, you can also view the source to see how to use these functions.
I am trying to build a little test shell for my website using Javascript. What I have at the moment is a normal website. PHP/HTML with an SQL backend.
What I'd like is a simple Javascript feature whereby the user has a single slider object and can use this object to set the upper and lower limit on a number of variables, which will be determined by a drop down box just underneath the slider.
Aside from this, I'd just like a number of checkboxes which dictate which products are displayed (i.e if I'd like food but not drink, the food checkbox would be ticked!).
I'm not expecting anyone on SO to do this for me, of course, but I would like to find some specific areas I could go to learn how to do this, and google is failing me in this regard. I will then begin working/editing this post to show my code/ask for help.
Can anyone help please?
It seems that you want to build a specific search for site, but instead of the user searching it is what is displayed. I would start with looking at php, based upon which checkboxes they choose, you can return variables which would show them what they want to see.
I personally wouldn't use javascipt for this.
I'm not sure what your level of experience is with Javascript, so my apologies if this answer is too basic.
To put a slider on your page refer here for the HTML:
http://webhole.net/2010/04/24/html-5-slider-input-tutorial/
Then in Javascript get the value of that slider when making your GET requests of the server.
You can store the selected value or checked value in the target element, when you process, you just call the element and get the value from them. Using jquery data() method can store the value to element and retrive it pretty easy.
If you still have no clue, I redcomend you learn some basic javscript techniques, go to this site www.jquery.com .
Are you using jQuery and jQuery UI? jQuery UI has a nice slider widget with a number of configuration options and good documentation: http://jqueryui.com/demos/slider/
If you're not used to it, there may be a bit of a learning curve for jQuery, but it makes a great number of UI features much, much easier to code. Showing and hiding elements based on checkboxes, for example, is a pain to do in straight JS but fairly simple to do with jQuery. There are lots of other ways to just make a slider, but if you're planning to do much more with the UI I'd strongly recommend using a library like jQuery to do the heavy lifting.
I'm about to implement a blog, and I'm pretty sure I want to go with jQuery, because I really like it.
However, when I last did jQuery, I just did plain HTML/CSS and then improved the user experience with what jQuery has to offer. Meanwhile, jQuery UI has been released, and it looks like a full-fledged user interface framework like Ext JS.
Can I benefit from jQuery UI with a rather simple website like this, or is it more geared towards web applications like GMail?
jQuery UI is quite large and seems to have lots and lots of CSS in their skins. I'm a bit worried that I would have to write/adjust tons of CSS to make the blog look like I want it to. If I did plain HTML/CSS, I would have fine-grained control over the appereance.
Edit: I'll stress again that I'm specifically wondering whether jQuery UI is intended for and useful for a simple website like a blog. It is no doubt useful for more sophisticated web applications.
Edit 2: Thanks for all your answers, too bad I couldn't accept more than one. By now I realised that jQuery UI is not like I expected a full-fledged web application framework, but rather a bunch of useful utilities on top of jQuery. I think I'll use it, if only for Draggable, Droppable and Selectable.
You don't necessarily need to write loads of CSS if you don't like the supplied styles.
The jQuery UI ThemeRoller is a very good web-based GUI for customising the look of the widgets. It then allows you to download your own customised (and minified) .css and .js files containing just the widgets you need.
I suggest that you should have a play with that first and see if you can make the demo widgets look how you'd like them before making any decision.
You can have both... I have! Where I am using widgets (datepicker) etc, I use jquery ui, besides visit : http://jqueryui.com/themeroller/ and you can customize the colours quite easily. The UI themes are recommended strongly if you use the widgets as the widgets rely on the css defined therein to move things around, for display and selection, handling rezise of widgets.
You can always build your site using html + css then add the ui theme later, as you said it will increase the user experience greatly... besides we always end up using 1 or 2 features then extend or find other suitable plugins.
As always, the answer is 'it depends'.
More specifically though, it depends on what kind of a UI you're planning on. If you find yourself coding functionality that's already there in jq UI go ahead and use it. They've got a handy theme roller plugin which will allow you to customize the skin to perfectly match the look of your site, so that is a non issue.
You might also want to include it all through a CDN (offered by google or MS) so that your site doesn't get slow downloading the (relatively) heavy initial payload.
I have several tabs that my site changes between using Javascript. When ever a tab is clicked I need to know which one it was and which one I am currently on.
I have done this through the use of if functions(lots!). I now want to add a new tab and I have to expand all my if functions etc.
Is there a different implementation I can use for this, so future adding of tabs is easy and I don't have to use so many if functions.
I hope I made sense and there is a solution.
The obligatory answer: Use jQuery, and then use jQuery Tabs. The Tabs plugin generates callbacks that pass to it both the tab being shown and the tab being hidden, which should work nicely for you.
If for some reason you are masochistic and enjoy writing plain Javascript for no apparent reason, then you need to post the code you are using so we can better help you.