Questions tagged as 'javascript'

1
answer

How to execute a javascript function from a json file

I have a json file that is generated by php and it looks like this: { "status":200, "command":"faca algo", "action":"function (){document.write('quer que eu faça algo?');}", "type":"acao" } How to execute the function...
asked by 07.10.2014 / 02:23
3
answers

How to traverse a children and a div with JavaScript?

I need a function that traverses #paicasas and leaves the background of all children "casa1, casa2 ...". I tried to do this but I know it's far from right. function apagar(){ for(var i in document.getElementById('paicasa...
asked by 10.11.2014 / 21:12
1
answer

How to create a textarea with multi columns (like a newspaper?)

Is there a way to create a textarea that its display is multi-column? I have several fields in textarea for the user to be able to make edits, but I need these textareas to be displayed in a newspaper form, those of multi columns. I resear...
asked by 29.09.2015 / 17:02
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
2
answers

How do I make the page print out the way it is viewed on the screen?

I need to make a page that, when the user prints, quit exactly as it is viewed on the screen (with styles), I'm using Bootstrap version 3.1. Is there a Javascript plugin that does this? The solution I thought was instead of getting the s...
asked by 14.04.2014 / 16:40
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

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
2
answers

How to make basic live stream with HTML5 video API and PHP?

I would like to know the basics about how to create a live stream system ... I have a blog script in php where I created a system of users and even a friends system but I would like to add the possibility of each user to create a channel "kind"...
asked by 28.12.2014 / 20:06