Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have a list of links that are by default sorted alphabetically. For example
<ul>
<li>Aeroplanes</li>
<li>Books</li>
<li>Cars</li>
<li>Diggers</li>
</ul>
This list is auto generated and in real life about has about 30 links, how can I easily order these with little overhead using javascript/jquery. The order will be changing often to boost categories depending on season/popularity a number of other deciding factors.
TinySort is a small script that sorts HTMLElements. It sorts by text- or attribute value, or by that of one of it's children. The examples below should help getting you on your way.
This doesn't use jQuery and it is fast in performance.
TinySort used to be a jQuery plugin but was rewritten to remove the jQuery dependency. It is now smaller and faster (and has no dependencies). Functionality is the same but changes have been made to the parameters and options.
Just use this way:
tinysort (NodeList);
<script src="https://cdnjs.cloudflare.com/ajax/libs/tinysort/2.1.1/tinysort.min.js"></script>
<ul>
<li>Aeroplanes</li>
<li>Cars</li>
<li>Books</li>
<li>Diggers</li>
</ul>
<script>
tinysort('ul>li');
</script>
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'd like to use HTML, CSS, and JavaScript to create a menu that looks like so:
Each Chapter has a little "node" to the left of it that when clicked would bring the user to that chapter's dedicated web page. Is this something that could be done using canvas elements in HTML?
You could create the images for the bullets and then use the list-style-image property when styling list. You can then use JavaScript to keep track of the state. Assign the appropriate image based on what the user has clicked.
If you need a sample of the code to get this working let me see how far you get then I can add pointers.
CSS list-style-image
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
So i'm building a website in PHP7, HTML5, CSS3, JQuery, JavaScript5 not WordPress to be clear. One feature i would like is to allow users to change their theme to something that is not default theme so how would one do this i mean making the theme and implementing them? Would it just be an element say a drop down box with CSS documents or something else?p.s. my other questions did not go down well so if this does not make sense or is unclear please let me know so i can improve it.
I didn't get your question exactly. But these are my opinions.
Generally , Custom Themes are added using themes(Non Wordpress) which you can download from sites like themeforest , envato market ,template.net etc. Either you can tweak it and make it your own or just use as it is. But if you do so please do have a glance at the licensing to avoid future problems.
And Dropdown menu can be made using CSS and JavaScript. I would say that its not a must. Its the content which makes it notable.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Using bootstrap I create one accordion panel-group that is populated with several panel-default and want to add a live search box to show only the panels that the user needs.
I found some examples of how to do that but with <nav>, <ul> and <li> tags, I tried to do it with the <div> tags but I can't make it work.
Here's what you request
with the fiddle you are using just change the loop selector
for this $("#panel, .panel-group, .panel-heading, .panel-body, .panel-default")
You can iterate through the classes what you want adding a . and the name of the class, # and name of the id for id's and if is there more than one just separate it by comma. The .each() is gonna search into all that elements and search you want.
https://jsfiddle.net/geradrum/yarn8kw2/1/
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a assignment.
I want to create a grid with list of friends with their name and photo add search bar on top of it whenever you type their name, it should filter and show only that by default it should show all.
This can be easy achieved using JQuery and a 3rd party javascript library called "Datatables".
Basically you only need to create an HTML table with all the names and photos, then add JQuery and Datatbles libraries to your HTML and initialize it.
On this link:
https://www.datatables.net/examples/basic_init/zero_configuration.html
you will find the most basic code example to configure datatables.
As comment, this solution will indeed give you the results you look for, but if this is a homework maybe your professor is expecting to you to code this functionality from scratch and not using 3rd party libraries.
Regards.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am looking for the approach about how the blocks are being displayed and being adjusted on this page
http://www.eonline.com
Js Fiddle
http://jsfiddle.net/3pcDe/
Thanks for any solution in advance.
jQuery masonry is your friend
http://masonry.desandro.com/
It's a really simple to use plugin with various options
Or, even better, take a shine to Masonry's bigger sister Isotope - she can do all sorts of tricks on top of Masonry and is as easy to handle. Both were developed and are maintained by the same developer; Masonry came first, Isotope was built as an advancement with sorting, filtering and other cool features, see and try for yourself here.