Questions tagged as 'javascript'

4
answers

How to get the first word of a string with jquery?

Ex: "First string word" I want to get the word "First"     
asked by 07.01.2017 / 17:34
3
answers

Escape Single and double quotes from the same text area giving crlt + V

// I want to just not let you enter single quotes and double quotes $('#bot').keypress(function (e) { var regex = new RegExp("^[a-zA-Z0-9-]+$"); var str = String.fromCharCode(!e.charCode ? e.which : e.charCode); if (regex.test(str)...
asked by 09.05.2018 / 18:50
5
answers

Difference between back-end and front-end? [duplicate]

Well, there's a home page that has 3 filters: (select) Property Type: House or Apartment (select) Business Type: Buy or Rent (input) City or neighborhood The person enters the 3 search parameters and clicks the "search" button. Next...
asked by 03.06.2016 / 20:05
2
answers

.empty () in javascript, how to do it?

I'm using a preview script for images created with jquery, however I want to accomplish it in Javascript Vanilla, I'm looking for a way to override the variableQualquer.empty (); but I did not find, how can I replace this command? JQuery code...
asked by 04.05.2017 / 22:21
3
answers

Clear Field with JavaScript

I'm using this function below, to validate the date in all date type fields of the form, I call the function in the onBlur event of the txt. function VerificaData(digData) { var bissexto = 0; var data = digData;...
asked by 11.08.2017 / 22:52
2
answers

Text on image [duplicate]

Hi, I'm new to this and I need to know how to make a text appear on the img by hovering a mouse over it for a school project, can anyone help me?     
asked by 12.08.2017 / 02:41
3
answers

Get code from a li

I need to get the <li> complete of all checkbox checked. My code that is dynamically mounted is below: HTMLNovo = ' <li class="item item-checkbox widget uib_w_69" data-uib="ionic/checkbox" data-ver="0">...
asked by 19.11.2015 / 11:52
2
answers

How to identify if the user is at the top of the page?

Upon entering the site the page will be displayed from the top (by default) , how to do to identify if the page is at the top using JavaScript pure and > jQuery ? Examples: If the page is at the top, hide the <div id="um-id"...
asked by 18.08.2018 / 00:58
4
answers

How to close a dropdown if the user clicks another place on the page?

What is the best method to hide a div , which is fulfilling the role of dropdown , when the user clicks another place on the page? At first, I value cross-browser solutions and without frameworks , but any extra application con...
asked by 23.12.2013 / 21:38
5
answers

Replace If / else with Case javascript

I would like to replace the if / else with Case because I believe it will be better for understanding the code since it will be a little long, but I can not access the Array that will have the conditions to activate the actions. Is the error in...
asked by 19.03.2014 / 15:07