Questions tagged as 'javascript'

1
answer

error with arlert function that I created

I have created a very simple alert function in php. It works, however, with a problem. Whenever I call it like this: Alert("Pedido finalizado"); It works, but when I put a \ n to have a break if line, it does not work. Example: Alert("...
asked by 15.08.2016 / 15:17
1
answer

Remove first p tag and last / p string tag with jQuery

I have a string with several HTML tags. I want to remove only the first tag <p> and the last tag </p> of this string. I've found solutions that remove all tags but these do not work. Example: <p> Lorem ip...
asked by 17.08.2016 / 17:01
2
answers

Get id onclick and send values via Ajax

I have a list of tasks, it has the status part, which shows for example 'In Test' and a Approve button. I'm trying to get this Approve button when clicked, grab the Task Id and send an update to it to change its status. But so far I...
asked by 29.08.2016 / 21:28
1
answer

Deleting content with JQuery

$('<li>').dblclick(function(){ var selfItem = $(this); selfItem.remove(); }); The above code is not working. I want you to double-click the item itself to remove it, and as an optimization I wanted to put a code so that only th...
asked by 30.08.2016 / 20:00
3
answers

Onblur event cancels the onclick event in jQuery or in pure JavaScript

I have a textarea field and a "submit" button just below, and added a onfocus and onblur event in that field. The onfocus increases the height of the field, and onblur returns to normal. I also added a onclick...
asked by 17.09.2016 / 21:43
1
answer

Referencing Variables in HTML

I'm a beginner in web programming and I have a simple (I think) doubt: I was wondering if there is any way to reference variables from a backend language (in my case I'm using Go-lang) in HTML? I'm using the Bootstrap framework to build the fron...
asked by 30.09.2016 / 13:26
1
answer

Set a default zoom for google maps

Good morning, I have a question about google maps. I have a location map of a company, but I would like to place a default zoom, for example, zoom 3, which when opening the page, zoom 3 automatically. <iframe width="940" height="368"...
asked by 30.09.2016 / 13:40
3
answers

jQuery Run CSS Animation only when content is visible to the user

I'm using an animation library called Animate.css which can be viewed clicking here . However, when you create an effect for a certain div , the effect is activated even though div is not visible on the screen, ie you sti...
asked by 22.09.2016 / 15:14
2
answers

How to allow the execution of html tags from a variable in angular?

I'm consuming data from an api using angular, api is returning the following value with HTML: variavel = '<p>testo de retorno</p>'; When I make the view in the view type {{variable}} is interpreted as string displaying the HTML....
asked by 29.09.2016 / 16:23
1
answer

How to repeat content on several static pages?

The question is as follows, I have only .HTML static files and am looking for a simple way to create the blocks only once using only the client side . The idea is to respect DRY, is there any way to do this directly with JavaScript or jQuery...
asked by 19.01.2017 / 13:37