Posts by Caio Koiti • 150 points
23 posts
-
1
votes2
answers142
viewsA: How to sort an object with Javascript?
I believe that you can simplify logic a little and at the same time, as the already mentioned suggestion, you should not believe that the Keys of your object will order your options. You could…
-
-1
votes1
answer75
viewsA: Problem capturing event scroll in iframe in iOS Safari browser
I believe that the best solution to this problem would be to use the postMessage API. The own page of this API via MDN contains examples of how to create this communication channel.…
-
2
votes3
answers1141
viewsA: How to call HTML code inside css?
First of all css only controls the look of html code, and it is not possible to inject snippets of code the way you are thinking. Adding a visual element around a class is possible with CSS as…
-
0
votes2
answers1287
viewsA: Recover value of a props in child component
You have access to the ZIP code within the component that instantiates the MAP and the ZIP code. Inside the MAPA you have access to the value of the CEP tbm. Your problem is: Before rendering the…
reactanswered Caio Koiti 150 -
1
votes2
answers346
viewsA: $(Function() does not work
First point: You are using a jQuery UI plug that would be another library that depends on jQuery to work. Check the compatibility of the jQueryUI version with the jQuery version. As already spoken,…
javascriptanswered Caio Koiti 150 -
0
votes2
answers96
viewsA: aside inside the header
If the tag in question is a <header ... />, yes it would be semantic since the proposed structure is something like the example of w3c itself.…
-
0
votes5
answers6529
viewsA: How to create buttons to increase/decrease font?
I’d settle it this way. - Javascript to add a class to your body/html to be used as the master selector that determines the font - Css controlling affected elements. // css body.fontSize10 { h1 {…
-
1
votes2
answers40
viewsA: How to prevent a property from being removed or modified?
Yes, there is a way to create an immutable variable using es5. const object1 = {}; Object.defineProperty(object1, 'property1', { value: 42, writable: false }); object1.property1 = 77; // throws an…
javascriptanswered Caio Koiti 150 -
1
votes2
answers276
viewsA: How to create dynamic variables in javascript inside a loop
Because you don’t put all ids in an array, then you loop, and then inside the loop you don’t do what you need with the ID? // Array inicial var IDformularios = [1, 2, 3, 4, 5] var validaFormularios…
javascriptanswered Caio Koiti 150 -
0
votes1
answer81
viewsA: Get Css properties
You can use getComputedStyle() which returns an Object with all attributes that have been declared for the last element. And using getPropertyValue() you pass the name of the css attribute you want…
-
0
votes2
answers1174
viewsA: How to disable an already enabled Function, or vice versa?
the ideal in this case would be to use as follows. $(elemento) .on('mouseOver', function () { // ADICIONA O EVENTO QUANDO O MOUSE ESTA SOBRE O ELEMENTO $(this).on('dblclick', function () { // ZOOM…
javascriptanswered Caio Koiti 150 -
0
votes1
answer150
viewsA: Error 405 - Cross Domain Request
Generally 405 indicates preflight/OPTIONS request, where the request is being rejected by the server itself, and does not even reach php or anything else you are using. You have to change apache or…
-
1
votes3
answers327
viewsA: External HTML in div without server
It would not be better to make a simple ajax via javascript giving request of the html file, and in this request you play the content where vc vc need? You can also create these html files only with…
-
0
votes4
answers1886
viewsA: How to make an input not accept blank input?
I believe you can only use jquery to do all the checking necessary for this simple search. I would make a modification only in this part. $('#buscar').click(function () { var keyword =…
-
-1
votes1
answer1285
viewsA: How to access webcam through PHP or JAVASCRIPT?
You can try using this framework in javascript. https://webrtc.org/ There is also a very nice tutorial in detail on the MDN site with some examples to start your tests…
-
0
votes2
answers82
viewsA: Problem with browsers
In addition to disabling the browser cache as in the previous answer, leave the inspector/inspector window open(needs to be open), click and hold the Reload button on the address bar side, and you…
-
0
votes2
answers104
viewsA: How to insert element inside another dynamically created
I believe I can use the jquery wrap to achieve what you want from the string shape. $(document).ready(function(){ var checkboxElment = $('#checkboxWrapped'); var wrapper =…
-
2
votes2
answers115
viewsA: Transition time does not work
If you want to use animations via jQuery, you have to use Animate $( 'aside' ).animate({ opacity: 0.25, left: "+=50", }, 3000, function() { // Animation complete. }); You can also use something…
-
1
votes3
answers79
viewsA: How to define an attribute to the parent form of a given input?
You can try this solution, a little more code, but when using selectors in chain, you end up slowing the performance of the software/site. Something that helps also always use variaveia and leave…
jqueryanswered Caio Koiti 150 -
1
votes2
answers1372
viewsA: How to slide between pages horizontally using a fixed menu?
you can use something like: $(function(){ $('.menu').find('a').on('click', function(e){ e.preventDefault(); $('.corpo').scrollLeft( $(this).data('scroll') ); }) }); but for this to work you need to…
-
0
votes2
answers380
viewsA: Problems with modals
I believe your solution is a little wrong. As mentioned, since it is using Angularjs, a framework that also uses jQuery in its code, there are certain points that should be aware when using them…
-
0
votes3
answers132
viewsA: Exchange td value after validation
Don’t forget to add an ID to improve the element identification. But I believe whatever you want is something like this: $(function(){ // just jquery init $('table').find('td').each(function (index,…
-
2
votes1
answer34
viewsA: Capturing URL parameter with jQuery
If you want to take only the last "string" ('login') you can use the split('/') property that will transform the URL into an array based on the/' used by it, and from this, you can take the last…
jqueryanswered Caio Koiti 150