Questions tagged as 'javascript'

1
answer

Dynamize Ajax Autocomplete Jquery with json data

I want to make dynamic suggestions with this API . < br> How to streamline the suggestion file by listing data from the mysql database?    Download DEMO:    link The file countries.js is what contains the suggestion dictiona...
asked by 10.11.2014 / 21:17
1
answer

Copy (clone) an SVG element

I want to "clone" an SVG rect in JavaScript when I click a button. I tried this code, but it did not work. <svg id="svg"> <rect id="rect" x="5" y="25" width="50" height="50" stroke="#0E0E0E" style="fill:red; stroke-width:1" />...
asked by 20.10.2014 / 02:19
1
answer

Is it recommended to use prototype on native objects?

I think the idea of having my own methods imported into the javascript native objects is very good. As for example: String.prototype.hello = function(){ return this.toString() + ' hello'; } 'Say '.hello() // say hello Number.prototyp...
asked by 23.02.2015 / 16:42
1
answer

Injecting content into text copied from the page

I'd like to know how to inject content into text copied from the page. When I copied a text from a website, it came along with an institutional text and the site link. You can see this happening in this site .     
asked by 27.02.2015 / 22:04
1
answer

jQuery Click does not work on results coming from $ .post

I'm developing a delete button on the product form that I have, it works like this Category 1 (Radio Button) Category 2 (Radio Button) After selecting a category, it sends a jQuery command to the $ post function and creates...
asked by 14.10.2014 / 07:09
2
answers

Insert points on a map with an array that passes in the database

I'm creating a site where I need a map, and users fill out forms with latitude and longitude to create a point on that map. Everything is stored in the database but I needed the point name, latitude, and longitude to be passed in an array first....
asked by 20.01.2017 / 18:18
3
answers

Add class after the page is loaded

I'm having a problem, I'm trying to add a css animate class to give an effect when I finish loading the page, but it's not working, it looks like it's adding the class before the page finishes loading, see the code : $(window).load(function(){...
asked by 10.01.2017 / 22:15
1
answer

Check for visible items inside a div

How to check if there is any visible element or vice versa within a <div> ? I can get around with jQuery and tried using el.is(':visible') but I could not because I need to check if everyone inside <div> is hid...
asked by 06.07.2015 / 03:48
3
answers

Working with array with X layers in JS

I have a big problem, I already researched in several places and I did not find the solution I hope you can help me ... My goal is to create a function in JS that will get an array as a base, which I will call here as " A " its structure is this...
asked by 01.07.2015 / 21:25
1
answer

Project Nashorn, javascript + java?

I found the approach interesting after studying deeper education bytecode InvokeDynamic . But I have doubts about the design and practical use. Will the javac natively understand the javascript block and will it generate the bytecode from...
asked by 27.06.2015 / 23:06