Questions tagged as 'jquery'

2
answers

How to remove a CSS attribute with jQuery?

In jQuery, you can add an attribute to an element by using the attr function. You can also remove an attribute using the removeAttr function. And when I define an attribute of css through the function $.css ? How do...
asked by 26.01.2016 / 17:29
2
answers

What is the difference between Javascript and jQuery?

I think of Jquery as a Framework Javascript in order to optimize writing, Ajax is a good example. In addition to facilitating writing, is there a difference between the two? What are the advantages and disadvantages...
asked by 26.04.2017 / 20:28
3
answers

How to use $ .on in pure JavaScript: "$ (...) .on (event, selector, function)"?

This is in jQuery we have on , any element <a> with class test e without the foo class will fire the function when clicked, even though you create the element after the event is already added: $("#new...
asked by 06.06.2017 / 21:42
3
answers

How to add a CSS class to images that did not load?

I have an HTML page with numerous images displayed as follows: <img alt="img1" width="50" height="120" src="my_image.jpg" /> <img alt="img2" width="50" height="120" src="another_image.jpg" /> <img alt="img3" width="50" height=...
asked by 04.01.2014 / 15:51
2
answers

Simple pagination in jQuery / Javascript

I'm looking for a simple pagination, no CSS styles, or anything like that. Only with the buttons below to change the page and with the elements on top. I'm asking, because the examples I find are a bit complex for me. I'm loading the data usi...
asked by 20.02.2014 / 18:58
4
answers

How to get only the numbers of a string in Javascript?

I would like to know if there are functions that return only the numeric values of a string, if any, which is the simplest and most efficient way to implement? Example: apenasNumeros("5tr1ng"); Result:    51     
asked by 01.02.2014 / 13:17
3
answers

Global variable in JavaScript

How to make a global variable in JavaScript? I need the variable that was declared in one function to work in another function. Example: JSFiddle $("#div3").click(function() { var fill = "a"; }); $("#div2").click(function() { ale...
asked by 12.09.2014 / 00:10
2
answers

Working with websockets

I'm trying to use WebSockets in PHP and Javascript and I'm confused, it uses the ws: // and wss: // protocol and the hostgator ) do not have these protocols enabled (I think!) and I can not connect, does anyone know if I need to enable these...
asked by 05.06.2014 / 21:39
5
answers

How to swap the img src of a small image for a large image?

Information: I'm trying to make a simple photo gallery. I want to show the image clicked in large size in the center of the screen. (Clicar em 0.jpg e mostrar em uma outra div 0Large.jpg) Problem: With the code I have I can do t...
asked by 14.02.2014 / 01:09
1
answer

Is it possible to make a negative border radius text box?

I would like to make this negative curve using CSS or Jquery, is it possible?     
asked by 15.12.2014 / 23:40