Questions tagged as 'jquery'

3
answers

Difference of hours between two dates with JavaScript?

Hello. I have these two dates: var dtPartida = "20170620 11:20"; var dtChegada = "20170620 16:40"; You need to find out the difference in hours between these dates in the case and 5 hours and 20 minutes. I need it to return like...
asked by 16.06.2017 / 18:08
4
answers

How to count how many times a value appears in a table

How to count how many times a value appears in a table? Example: <table id="table"> <tr> <td> 2 </td> </tr> <tr> <td> 6 </td> </tr> <tr> <td> 2 </td&...
asked by 01.09.2014 / 23:13
2
answers

How to show only "x" characters in a div?

Hello, I'm developing a system where I will be publishing, but I would like that, in each publication, it shows "x" characters, and going from that value, it shows a button labeled "Show more", just like Facebook . If anyone knows how to do t...
asked by 01.02.2016 / 00:59
3
answers

Hide image generated by Javascript

I'm using the sharethis plugin to share content on social networks. For this I am making the following call: <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=YOUR_PUBLISHER_ID"></script>Th...
asked by 27.02.2014 / 00:04
3
answers

Select elements that contain a particular "date" attribute

On the page there are several elements with data attributes. To avoid going to add CSS classes to the elements, making the page code denser, I would like to select elements by the name of the data attribute. Example <div id...
asked by 14.01.2014 / 15:33
2
answers

How to make an effect by adding a new item to a list

I have a list that updates from time to time and I would like to add a similar effect to this site: Site This is the list that is in the middle of the site. Where, when a new item enters the list, the rest of the items go down making an...
asked by 23.03.2014 / 01:20
2
answers

How to disable mouse scroll button?

I would like to know how to disable the scroll central button ? I do not want to take the scroll just the scroll button of the mouse that has a right-hand side up and down when I click it, I want disable it.     
asked by 17.04.2015 / 21:15
1
answer

HTML5 video without context menu

How do I disable context menu of the right mouse button in videos, so that the video menu does not appear? $('#nome').contextmenu( function() { return false; }); The code above, but does not work in internet explorer, the video is left...
asked by 12.04.2014 / 23:28
2
answers

How to do multiple replace using variable as first parameter?

When I want to do a replace on all occurrences of a string I do this: var ola= "ola mundo ola mundo"; ola = ola.replace(/ola/g, "xxx"); Result: "xxx world xxx world"; But I want to use a variable instead of putting the word explicit, li...
asked by 23.02.2015 / 22:04
3
answers

Create a real "loading ..."?

I've been researching some cool effects for a "Loading ..." But I noticed that on all sites, they use timeout to get the animation in and out of the page, so it's just a beautiful cover of some cake. So I stopped to think, timeout based on...
asked by 22.05.2015 / 21:19