Questions tagged as 'jquery'

1
answer

What is the difference between using return false, event.stopPropagation () and event.preventDefault ()?

In a jQuery event handler, you can use return false , event.stopPropagation() and event.preventDefault() (or combinations thereof) to "cancel the action" of the event. I know it has a difference in their behavior, but hone...
asked by 12.12.2013 / 12:02
4
answers

How do I set a "horizontal menu" at the top of the window when scrolling the page?

I have a layout with a horizontal navigation bar at the top of the site, it has margin-top:100px , when scrolling the page the menu should be set at the top of the window but with margin-top:0 . What is the best way to accomplish...
asked by 04.02.2014 / 16:51
4
answers

How to create a real-time notification system similar to Stack Overflow?

I am developing a Help Desk system, and would like some ideas on how to create a notification system similar to Stack Overflow itself, whenever any new support is registered. I want to use PHP, MySQL and jQuery only. Should I use window...
asked by 16.03.2014 / 20:21
2
answers

How to disable a text field for editing using jQuery / JavaScript?

Let's say I have a form with fields from 1 to 7. Something like: field-1 field-2 field-3 field-4 field-5 field-6 field-7 All of these fields are on a form. With Laravel, sometimes I experienced situations when I disabled a field with...
asked by 03.02.2014 / 15:13
4
answers

How to make Ajax requests, with Jquery, in different domains?

Is it possible to perform a POST-type request to a url that is not part of the domain of our application? $.ajax({ type: "POST", url: "http://www.dominioexterno.com.br/acao/", data: { var1: $('#input1').val(), var2:...
asked by 09.04.2014 / 15:09
2
answers

Is it possible to add scroll-only overflow behavior in a table's tbody?

You can add overflow behavior with scroll only in tbody and still do not have to set fixed sizes in pixels without having to separate the header of the columns with the body, as seen in the plugins that provide grids ? css fo...
asked by 12.09.2014 / 16:06
2
answers

What is the difference of $ (this) and $ (event.target)?

Well, a question arose while I was tinkering with jQuery and the code worked perfectly in Chrome using the $(event.target) event, already in Firefox it only worked with $(this) , so that doubt arose. What is the main difference betw...
asked by 19.02.2015 / 12:29
6
answers

How to make a custom ScrollBar?

How to modify the scrollbar of a div , to appear as in the example of the image below (Hangouts) instead of the default operating system scrollbar?     
asked by 07.01.2014 / 04:18
3
answers

click on a button play on YouTube iframe

I have iframe of Youtube, and a div over it, I want it when the user clicks on that div it plays in the video. My HTML: <div class="p-relative"> <div class="botaoMaior"> <div class="btplay">&l...
asked by 02.02.2015 / 11:33
2
answers

Why should we use anonymous functions with jQuery instead of the function directly?

I have a doubt, some jQuery methods expect a function as a parameter, but to work they should receive an inner function as a parameter instead of a function directly, as in the example below: $("a").on("click", function() { retornaNada(); });...
asked by 03.02.2014 / 16:59