Questions tagged as 'jquery'

3
answers

Extract data from txt file to use in autocomplete

   Update: Just for the record, you do not need to use jQuery-ui, it might be another solution. I'm creating a autocomplete for a form, which should include all the options of the CBO - Brazilian Code of Occupations Unlike the zi...
asked by 10.04.2015 / 18:16
3
answers

Multiple lines of text or code with the ".html ()" method

When using the jQuery .html () method to apply multiple lines of text or HTML code to an element, it fails with error: Example in JSFiddle $(function(){ $( '.qualquerClasse' ).html( ' conteúdo de 3 linhas de código: uma...
asked by 04.02.2014 / 03:27
3
answers

Do you have any problems while playing the function for variable

Can anyone explain to me if I have a problem while playing a function for the variable, for example, in this case I'm talking about var marcar . This code is working, I do not know if it causes a performance loss or something else. Will...
asked by 11.03.2014 / 21:39
4
answers

What technique do you use to keep fields in a form filled or selected after $ _POST []? [duplicate]

I'm developing a real estate system and would like to ask how can I keep data for a form such as inputs , selects and checkbox selected after giving $_POST on the form. I do not know how to store this data for all...
asked by 18.11.2015 / 18:06
2
answers

Discover the position of the Scroll of a certain object

Is it possible to know the position of the scroll of a given object through Jquery or pure Javascript? I tried var posobj = $("#meuobjeto_id").scrollTop(); However, the value obtained is always 0. Any idea? I want the user to go through...
asked by 19.11.2014 / 19:48
2
answers

Detect or block redirect with ajax?

I'm having a problem with an ajax request I'm making. The requested url is a url x , but when I make the request, it redirects me to a url y . I'm using the $.ajax function of jQuery. I would like to know if you can d...
asked by 07.12.2015 / 14:51
2
answers

Is it correct to concatenate PHP in JavaScript?

I often use this method, but I do not know if it is appropriate, to redeem the id in JS I use echo php <script type="text/javascript" src ="js/jquery.js"></ script> <script type ="text/javascript"> $("document").ready(functi...
asked by 09.01.2016 / 15:24
2
answers

Why setting a CSS property with the! important attribute does not work in the .css () method?

I would like to know the real reason for the inability that the jQuery.css () function has, which would be the fact that when using the !important attribute on any assigned CSS property, it is not added. I would also like to know if...
asked by 20.02.2014 / 00:12
3
answers

How to return key of object with greater value in Javascript?

Let's say I have the following object: var obj = {"frutas": 50, "vegetais": 100, "carnes": 150 }; How would I be able to return the key of the highest value item? Example: obj.maxKey(); // "carnes" I have tried some functions that trea...
asked by 16.03.2015 / 20:57
3
answers

How to enable and disable fields when clicking button

I have a page made with bootstrap 3 where I show some fields coming from my DB, now when opening the page I need all fields except for a Iniciar Tarefa to be disabled, the Iniciar Tarefa button will be responsible for enabling the...
asked by 01.04.2015 / 20:10