Sort HTML Table by Column on Load - javascript

My page has a table (a telerik grid?) that, upon loading, I would like to sort by column, as if the one in question had been clicked by the user. I'm presuming the best way to do something like this is with telerik, javascript, or jquery, all of which I have a woeful lack of experience with, and I find myself not knowing just where to begin.
My thoughts are that the column in question will be selected by its text contents, as the only other identifier - class - is identical among them all. Then either trigger or replicate the column's onclick event. Am I going in the right direction with this? Would anyone have a suggested route to progress forward with this? I'm trying to treat this as more of a learning experience than just "give me answers!" sort of thing, which I hope is an acceptable thing to post around here.
EDIT: Besides the suggestion from #josh, below, I'm also experimenting with something like this.
jQuery(function(){
jQuery("a:contains('submitted')").click();
});
</script>
or this
$(document).ready(function(){
$("a:contains('submitted')").trigger('click');
});

Related

How to select elements/values, and "recall" them as a group afterwards?. Javascript?

I am currently trying to code a "product-builder" in HTML/CSS, and was thinking of using Javascript since that is the language i understand the best. (still terrible at it).
Now i was thinking of making it a multiple step process, where you select different "parts" or values, by clicking on a div/img, and after all 5 steps, you will be able to see your selected elements, and make a "order" to the store.
Now my issue is that my javascript is not that strong, and i cant seem to find an example of this type of code. Therefore i was woundering if someone knew a way to select values in javascript, and recall them later. I think this might be easy for anybody that knows javascript, but i cant seem to figure out how to do it.
I found this template, which pretty much sums up what i was thinking.
https://codyhouse.co/demo/product-builder/index.html
Hope someone can understand my question, and are able to help.
Thanks in advance
Andreas.

How to implement Scroll Navbar?

I'm not sure if the name "scroll bar" is true at all. I would like to install a scrollbar, in which you can simply select a city with the mouse wheel (on a smartphone with a wipe) and then select the possible cities of the respective country in the second window.
I mean something like this has already been seen but unfortunately I could not find a good example.
Does anyone know the exact name and has perhaps a sample code?
Updated the answer as per comment
I think you better use Select2 for this.
You can find all the details and support you need in its Basic Usage page.
And about your Question - only post question if you have tried solving it by your self (if you have tried, post the method you have tried with a sample code) or try Googling it, this may help more than you know.
Update2
As per your comment, i understand that what you need is a spinner in this case you can use Input Spinner Plugin for this. You will need some styling changes but this will work your way.
Hope this was helpful for you.

Filter Web Content with Drop down

I'm using a "PHP website" and i'm not being able to give to user a "drop down filter" to filter the content... In resume, i would like to give to user the same experience as in this website: https://www.hidglobal.com/products/rfid-tags/identification-technologies
If you change the options at the right side, on the Dropdown menus, the content will be filtered. Is exactly what i need to do in my website, but i'm not 100% familiar with javascript, so, if someone perhaps can help me... I'm searching on the web for more than 4days and all the answers that i find is always for tables, and this is not exactly a table, so, if someone peharps can help me, would be wonderfull!
Thanks a lot!
To implement this kind of dynamic web content the easiest way is to use a data-binding front-end library such as AngularJS or backbone.js. Of course you can always write your own js code for this but that just won't cut it. I suggest getting familiar with one of these libraries and use for example an ng-model binding with the select dropdowns to the right bound to the content you show on the left hand side (AngularJS).
Yes, i understand that no ones will come with a "free code" to me, that's not my intention...
I already take a look into their code, but as their website is giant, to me it's a little bit hard to understand it all, as i'm not a "Pro".
I would just like that someone tells the right way to approach the problem, and what should i search, don't know, something that helps me finding the solution...
Thanks.

Autocomplete/tagging jQuery plugin with ordering and cursor

I'm looking for a jQuery tagging/autocomplete plugin where I tags can be inserted mid-order - and control over this is possible with the mouse.
I've gone through everything I can find, but am yet to find a plugin with all the requirements I'm looking for. I'm looking for a Facebook-esque tagging plugin, yet I'll be working with pre-defined phrases, and building them up into a paragraph, so I need to be able to control the order, and potentially insert a new tag in the middle of an existing selection.
The closest I've found to having this functionality is TextBoxList and the 'Facebook Theme' of JQuery TokenInput. Both of these however only allow you to move the cursor between tags with the arrow keys - and I'm looking to be able to mouseclick to control the cursor aswell.
Anyone know anything that's got what I need? A few other key essentials are free-text input (when no tag matches), remote source of data, and form submission, but I'd hope they'll be easier to retro-fit to something else!
An update for Googlers - I went with jQuery-tokeninput, and have spent the day modifying the library to work with mouse input. When I get time to tidy the code, and check how it works with other themes, I may put a pull request on GitHub, it seems like fairly useful functionality to me.

jQuery content slider with customisable grid of elements

Does anyone know of a jQuery content slider (not just an image slider) that allows you to specify a grid of elements?
As an example, this is the sort of grid that I'm after:
http://cl.ly/image/0O213C1n2b0s
You can see that it's a 2x2 grid. With the controls, when someone clicks on a 'next' link, it should scroll to show the next 4 elements. I'd like to be able to have multiple instances on a page, each having different grids (I may be 3x2, 2x2, 4x1 on the same page)
Also, as an added caveat, I need this to be responsive.
First question is; does anyone know of a solution that already exists which would fit my requirements? If not, that leads to my second question; would anyone like to help me write such a thing? I'm relatively savvy with javascript (more specifically jQuery if I'm being absolutely honest) but by no means an expert.
I've done a fair amount of googling, but came up short. Hopefully someone is way ahead of me and has already written something along these lines.
What say you, Internet?
Have you seen this:
jQuery grid syle slider

Categories

Resources