Questions tagged as 'jquery'

3
answers

How to use the preventDefault function in a click event inside an iframe?

I manipulate the iframe's DOM as follows: ( link ) $('iframe').contents().find('a').função(); We usually use the preventDefault function like this: $( "a" ).click(function( event ) { event.preventDefault(); }); Doubt: How do I u...
asked by 13.12.2014 / 06:10
1
answer

Problem passing parameters to function

I have the following JavaScript code to which I want to pass parameters from a onClick event, but they are not recognized: HTML <a id="addplaylist" href="javascript:void(0);" onclick="Addplayer(true,'', '', '', 'public/playlist/...
asked by 21.12.2014 / 00:07
1
answer

How to make a div close when clicked off it?

   It is possible to make if a person clicks out of a div that contains a flag it automatically closes, but if he clicks inside the div of the flags nothing happens? NOTE: Only if you click outside the div will it close....
asked by 21.12.2014 / 04:41
2
answers

Add methods to plugin namespace without selector

I'm creating a plugin in js and need to add some methods to this plugin. This is the base of the plugin so far: (function ($) { function jarbas(params) { ... } $.fn.jarbas = function (params) { // cria fu...
asked by 22.12.2014 / 14:32
2
answers

Json treatment

I have the following JSON return from a page: { "0":{ "id_user":"10", "contente":"45454545454", "time":"azul", "nick":"ikeda." }, "1":{ "id_user":"10", "contente":"4", "tim...
asked by 22.06.2018 / 21:31
1
answer

Modal that opens only the first time [duplicate]

I'm new here, I have a modal that opens automatically, I wanted to make it open only the first time for the user. I saw you have a way to do with cookies. insira o código aqui <!DOCTYPE html> <html> <head> <meta name="...
asked by 28.06.2018 / 02:10
3
answers

How not to activate js inherited function?

As you can see in the example below, I have a collapsible and in the initial structure I have a button / link (sign of the example), I would like to be able to push this button and not activate the function that expands the collapsible link...
asked by 16.07.2018 / 14:28
2
answers

Error - Jquery does not load function correctly

The error appeared after I tried to add the .click (function ()) As you can see in the image above, the result is not expected, it would be that h1 would be orange, with a fadeIn, and an onclick function. JQuery: $(document).ready(fun...
asked by 15.09.2018 / 22:49
3
answers

Involve part of a string

I'm testing a function to select the part of a title that comes after the colon: $('.carousel .item .carousel-caption h2').each(function(){ var val = $(this).text(); console.log(val); var string = val.substr(val.indexOf...
asked by 05.08.2014 / 21:03
1
answer

How to call code in jQuery from a form request?

I have a system with several forms calling jQuery and ajax to solve the problems and register the data retrieved in the mysql database. Since I am a beginner, I am having problems due to lack of knowledge. What I learned: <script src="jQuer...
asked by 07.08.2014 / 04:21