Questions tagged as 'javascript'

1
answer

JavaScript animation (hover) for Touch

How can I make an animation in JavaScript that has CSS hover event, work for when the user uses the touch on a mobile, for example. My animation code does not work for Touch (Mobile). What is my option?     
asked by 05.05.2015 / 04:17
1
answer

How to only validate fields that are visible?

I have a form with several fields (inputs, selects), but some are as display: block and others as display:none; as I put validation in all when I submit the form I wanted to check only those that are visible on the screen and not a...
asked by 04.05.2015 / 13:38
3
answers

Collect the instagram tag images for the site

Good evening! I would like to create something like what you can see at the bottom of this page: link Show all the photos that are tagged #taflovessneakers and I would like to do the same for my website Is it a very complex job? I have s...
asked by 03.05.2015 / 01:32
1
answer

Ajax Status == 0

I'm using a function in ajax to make some dynamic requests, but req.status is returning 0 instead of 200 . What can it be? Below the code: if(window.XMLHttpRequest) { req = new XMLHttpRequest();...
asked by 06.05.2015 / 20:34
1
answer

How to make an ajax request that returns a text in html?

Assuming the link making the request is: <%= link_to 'New Classroom', new_classroom_path,class: :remote_link, remote: true %> And that the return processing of it is: $('.remote_link').bind('ajax:success',function(e, data, status, x...
asked by 05.05.2015 / 01:19
2
answers

ng-click Does not work with dynamically created elements

Good evening I have this method $scope.register_popup = function(id, name) { for(var iii = 0; iii < popups.length; iii++) { //already registered. Bring it to front. if(id =...
asked by 09.05.2015 / 02:33
1
answer

Overlay a cursor on two divs

I call a function 2 times to create a div and a cursor with two lines (horizontal and vertical). I wanted these two lines to work on the two divs created dynamically. It's only working on a div. var count = 1; f(); //call function f(...
asked by 30.04.2015 / 00:22
1
answer

Set $ scope value of a Controller from an Angular Directive

I'm trying to get an object from a Controller from an event in a directive, the controller's method call is already correct, but it seems like $scope within this method is wrong , since if $scope.file.data from the call of the even...
asked by 30.04.2015 / 19:30
1
answer

Change SVG animation

I have an SVG animation which is a rotation. I want to change its speed through an input number (dur = variable). <svg width=400px heigth=400px> <rect ry=0 rx=0 x=100 y=100 width=50 height=50 fill="blue" id=rect> <animateTra...
asked by 14.04.2015 / 12:12
1
answer

Validate categories with regular expression

I'd like to know how to validate categories with regular expressions. So I have a list of categories separated by commas. Each word must have a maximum of 20 characters, I need to validate each comma if the word has alphanumeric characters. I...
asked by 08.08.2015 / 23:17