Questions tagged as 'jquery'

1
answer

Multiple events in JQuery selector

Does anyone know if / how can I assign multiple events to a JQuery element on a single line? For example: $('#elemento') .keyup(function(){...}) .focusout(function(){..});     
asked by 09.09.2015 / 21:13
4
answers

How to change an element within a less file?

@fundo:#fff; //como alterar isso, externamente com javascript @texto:rgb(94, 135, 176); //preciso mudar essa propriedade dinamicamente. .wrapper{ background-color:@fundo; } nav a:hover{ color:darken(@fundo, 30%); } nav a{ color:da...
asked by 25.02.2014 / 16:44
2
answers

jQuery - Toggle background-image of an element

I have an element figure with a series of images inside: <figure class="MiniModImgSlider"> <img src="img01.jpg" alt="img01"> <img src="img02.jpg" alt="img02"> <img src="img03.jpg" alt="img03"> <img src="img04...
asked by 14.04.2014 / 18:21
1
answer

Change class when resizing screen

I want to change classes as the screen is resized, the code I'm using only works if I refresh the page, I would like to make the class change without needing to refresh the page. Code: $(".call-principal").each(function(){ var scre = $(...
asked by 01.04.2014 / 10:34
3
answers

How to create a plugin for jQuery's $ () function

I noticed that you can create plugins in various jQuery functions like AJAX, CSS (using cssHooks ), animate , create new functions, among others. But I thought if you could create a plugin for the service call function, for examp...
asked by 07.05.2014 / 00:13
1
answer

Capture user data from Facebook

I'm trying to collect with JAVASCRIPT / JQUERY some specific user data that is not part of my friends list. I would like to capture data as: likes , friends , posts and groups . I did some testing and saw no diff...
asked by 02.05.2014 / 19:45
2
answers

Limit scrollbar according to div size

Is there any way to limit the page%% by size (height) of a barra de rolagem ? Let's say I have a site like any other, but when I open a floating% 1000px height, I want the div of the mouse to hang when it reaches the end of thi...
asked by 15.12.2014 / 19:53
2
answers

How to call a function from another JS file while maintaining the context of the current function?

I have the following scenario: HTML: <script src="JS1.js"> <script src="JS2.js"> In JS1 I have the following: $(document).ready(function(){ var pagina = "site1"; iniciarSite(); }); In JS2 I have the following: f...
asked by 14.01.2015 / 19:22
1
answer

Is there any difference between an event with passing parameters to one without a pass?

Considering: jQuery $("#seletor1").on("click", function(){ $("#seletor2").trigger("click", {dados: "informação"}); }); $("#seletor2").on("click", function(){ //faça coisas }); $("#seletor2").on("click", function(evento, dados){...
asked by 15.07.2014 / 22:56
4
answers

How to execute a PHP function in the background?

I'm using the cPanel API to add dynamically parked domains. So far so good, I send the required data via jQuery.post() only this process takes a while to complete, about 1 minute. Are there any alternatives for the process to continue...
asked by 12.08.2014 / 06:06