You can set multiple attributes for HTML element with jQuery.
You can set multiple attributes for HTML element with jQuery.
It took me some time to get the index of selected value of <select> html control. I tried to use 'attr', but 'prop' should be used for this.
Tables with at least 20 rows are more readable when its rows look like stripes – even row in one color, odd one in another. Before jQuery we used to add class to each row of table, we made "<tr class="even"> …</tr>" and "<tr class="odd"> …</tr>". Now it’s much easier to do using jQuery. (read more...)
Below I described two string javascript functions that I often forget. (read more...)
When I wanted to get the ID of clickable element using jQuery, I have found out that I don't remmember such a simple thing. I had to look for it. And I've found it 🙂
I had buttons with class "phonebtnCall" and some IDs. I wanted to know which of buttons was clicked. (read more...)
Sometimes when you work with jQuery, you want to change css-style of elements. There are two common ways to do it: 1 – to change class of element, 2 – add css attribute (read more...)
This code disables context menu, cutting, copying and dragging text. Sometimes you need it. Just add the code to a page or to .js file and include it to a page.
When you have a table which you can’t edit, you think you can’t do anything with it. It may be a result of an outside procedure or web-service (usually it returns data in XML, but html-table also can be).
So, for example, we have a list of Borussia Dortmund players. We know id in list, Name of player, his Lastname and date of birth (Figure 1). (read more...)
Using Google AdSense panel I saw that google gives only 3 stars of 5 available. My self-esteem warmed up because I want five stars 🙂 So I’ll tell about it. (read more...)
For example, I need to make list like this:
My list items
- item1
- item2
- item3
Here's a nice way to make list with dashes. (read more...)