How can I use multiple toggle on one page JQuery?
How can use multiple toggle on one page? I have two div in my HTML file and I want to hide or remove the child-1 div and then replace with another div child-2 when every time that clicking on parent title. my HTML structure as below: <div class="parent"> <h2>Title One</h2> <div class='child_1'>paragraph 1</div> <div class='child_2'>paragraph 2</div> </div> <div class="parent"> <h2>Title Two</h2> <div class='child_1'>paragraph 1</div> <div class='child_2'>paragraph 2</div> </div> and my jquery also
what would be a possible solution for
$(document).ready(function () { $(".back-dark-1").ready(function (){ $(this).css("background-color",$(this).css("color")); }) }); wanted to grab a css element and put it in another attribute of the DIV Anyone know how to do this?
onclick attribute is not working on mobile
Hi, please I have this code <optgroup label="Service Group"> <option class="dropdown-item" onclick="testFunction()">service 1</option> </optgroup>and when I click on this option from desktop, testFunction runs perfectly, but when I click on it from my mobile browser nothing happens. function testFunction() { jQuery('#test.recommend_link').show(); jQuery('.recommend_link').not('#test').hide(); } How could I solve this problem??
Smartmenus Responsive Submenu doesent works?
I have integrated Smartmenus from https://www.smartmenus.org/. I have written on Developers Forum but nothing Answers. In the Chrome console I get this error. This error is only on responsive submenus. jquery.js:2 Uncaught RangeError: Maximum call stack size exceeded at String.replace () at Function.fb.matchesSelector (jquery.js:2) at Function.m.filter (jquery.js:2) at w (jquery.js:2) at m.fn.init.is (jquery.js:2) at $.SmartMenus.docClick (jquery.smartmenus.js:319) at HTMLDocument.e (jquery.js:2)
Background color selection
I have a problem with this code here: https://jsfiddle.net/09aue04a/ When I try individual highlighting, it works. but I can't make it work for highlighting "Select all" with different colors. $(function () { $('.selector').on('click', function(e) { var checked = this.name; var selectedColor = ''; if (this.checked) { selectedColor = $('#nextColor').val(); } $('td').filter(function() { return this.textContent == checked; }).css('background-color', selectedColor);
Standard pseudorandom number generators cannot withstand cryptographic attacks in jquery.js lib file
After running Fortify Security Report getting error in jquery.js main lib file.The error is math.random() is not secure for cryptographic attacks.So please suggest me any change in lib file or create separate functions and replace in lib file.
Using Access Token in jQuery
Hi everyone I have a question related to linking APIs to a third party service. What I’m trying to do is the following: 1- Uploading a file ( image or Microsoft word file) to a home page I have designed by HTML5 2- Posting the uploaded file to a third party platform ( I’ve built an app on their platform and I’ve the access token) The problem that I’m facing is in post step especially the part of writing the code that includes access token and folder ID (the place that the file will be uploaded
text from input not being sent to script
I have an on screen keyboard that when characters are clicked they are added to a text input. This part works fine. The problem is that the text is not getting sent to the search script I'm using. If I manually type in the text input with a real keyboard it works fine. The html for the text area is: <input id="songname" type="text" autocomplete="off"> The script I want to send the text to is: $("#songname").bind("input paste DOMAttrModified", function() { var Title = $("#songname").val();
Updating hide and show code problem
I'm updating some jquery hide and show code. The new code works on other pages. The difference is the new code on the working pages do not use the table tr and td tags. I think the tr and td tags are interfering or causing the div to be too far removed from the triggering anchor tag. Old code that uses an old hidenshow.js include script $(document).ready(function(){ $('.show_hide').showHide({ speed: 1000, easing: '', changeText: 0 }); ... <tr> <td><a class="show_hide" rel="#slidingDiv3"
Can we show FaceBook Page Plugin posts horizontally
Hi All, Can we show the facebook Page plugins posts horizontally on runtime. Can there is any JQuery solution available because we can change and override the twitter timelines horizontally. Can it is possible with facebook. Or there is any such JQuery plugin available for ASP.Net or SharePoint developers. Any idea please share
select input with given name and value from radiobutton
I’m trying to display a div tag, if the user selects option 4 from radiobuttion. I'm not an expect on javascript! <script type="text/javascript"> $(document).ready(function () { $("#GenderInAnotherWay").hide(); $("input[name='Gender'][value=4]").prop("checked", true);{ $("#GenderInAnotherWay").toggle(); }); }) </script>
Select an element of form field from an array of fields
Hi everyone I have a form with an array of field, like this <div class="thumbnail"> <img id="photoimg[]" name="photoimg[]" src="<?php echo $photo[0];?>" <div class="thumbnail"> <img id="photoimg[]" name="photoimg[]" src="<?php echo $photo[1];?>" <div class="thumbnail"> <img id="photoimg[]" name="photoimg[]" src="<?php echo $photo[3];?>" ...... and so on..................... I wish to update photo while i press "browse" button, something such: <input type="file"
Upgrade from myEclipse Spring to myEclipse 2017 of jQuery error
Dear Sir/Madam, I have opened and converted the web project in myEclipse 2017. It is JDK 1.7. Everything fine but it has error in jquery javascript compile error. 'with' is not allowed in strict mode as noted in the attached screen code. I believe it is setting in myEclipse about not set strict mode. Am I correct?? Please let me know if you have any ideas. Thanks,
jquery compile error on "
Dear all, I have below code that having compile error. But I do not know and cannot find in some web site. Is there any way to solve this?? Multiple annotations found at this line: - Expected end of statement or expression. <html:hidden property="authenticationCode" /> <input type="number" id="authenticationCode" class="text_field text1" min="0" max="99999999" inputmode="numeric" pattern="\d*" autocapitalize="off" submitName="" autocomplete="off" maxlength="8" onblur="$("input[type='hidden'][name='authenticationCode']").val(this.value);"
How to get google fonts automatically in FONT TEXT Box?
How to get google fonts list in form (font text box), without typing font families in jquery?
links don't work
Hello, I want to make a new design for my website and want to use accordeon. it's work well, but my page is linked to a sql database and if I can see the result without problem the links don't work. don't know why, who have an idea? thanks you can see the test there: http://marcolympics.org/futur/2010-2012/e_jour.php the code: <h3><a href="#">Jeux</a></h3> <div>
<?php do { ?>
<table>
<tr bgcolor="<?php
if ($SSAdv_m1%$SSAdv_change_every1==0 && $SSAdv_m1>0){
$SSAdv_k1++;
}
print
Accessing td inside of div for editing
I need to provide users ability to edit within table using double click. For this I have the following code: $(function() { $("table td").dblclick(function() { var OriginalContent = $(this).text(); $(this).addClass("cellEditing"); $(this).html("<input type='text' value='" + OriginalContent + "' />"); $(this).children().first().focus(); $(this).children().first().keypress(function(e) { if (e.which == 13) { var newContent = $(this).val(); $(this).parent().text(newContent);
Unexpected token for JSON.parse
Hi, I am trying: JSON.parse(params.is_employee); but getting: Error: 'Uncaught SyntaxError: Unexpected token u in JSON at position 0', line 1, file 'http://localhost:54065/index.html#'. What's the reason? Thanks, Jassim
jQuery Intergatiion with Paypal Standard
Hi, I have a project to use (Paypal standard) for online payment. Is it possible to use with jQuery to avoid the standard payment form and use my own form then just pass the amount through jQuery? Thanks, Jassim
Adding dash every 4 typed characters
Hello, I would like to have a "-" to addup to the every 4 characters of my codes but struggle with the jquery on this. The code has to look like : xxxx-xxxx-xxxx-xxxx Meaning that 3 dashes will be needed. The code I got at the moment is: <input class="form-control input-lg" id="coupon-field" type="text"> <script> $('#coupon-field').keyup(function(){ $(this).val($(this).val().replace(/(\d{4})\-?(\d{4})\-?(\d{4})\-?(\d{4})/'$1-$2-$3-$4')) }); </script> I thought this would work but doesn't,
Jquery estaba funcionando correctamente, cuando instale la fucionalidad de oracle dejo de trabajar
hola soy nuevo con jquery estoy en medio de una situacionque me tiene confundio, la historia es que estube probando jquery y me gusto, probe datatable, botones, conexciones handler y todo funcion correctamente, la base de datos es sql server y visual estudio 2015, asp.net c# pero se me ocurrio conectarme a Oracle, las conecciones funcionan correctamente y algunas consultas donde no uso jquery. pero cuando quiero empiezar a llamar las funciones de jquery ya no funcionan solicito ayuda para ver que
Why click event auto runs when page loads?
I have a modal <div class="modal fade" id="selectLanguageConfirmModal"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h3>Select Language</h3> </div> <div class="modal-body"> <p>Are you sure you want to do this?</p> </div> <div class="modal-footer">
pointer-events: none; doesnt work in IE
pointer-events: none; doesnt work in IE but works in chrome, I need to disable checkboxes in IE, is there any way to disable checkboxes from CSS?
How to convert html div to pdf format in jquery
I want to convert html fields to pdf format using jquery.. I need to remove input fields , instead of that i need to display value in text My code as follows <!DOCTYPE html> <html> <head> <title>TODO supply a title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="http://code.jquery.com/jquery-1.7.2.min.js"></script> <script src="jspdf.min.js"></script> <script type="text/javascript"> $(function () { $('#cmd').click(function () { var
Cant change font awsome icon color on success post
I am trying to select a button <i> element using jquery and change its colour its a font awsome tag within a button grouping my problem is I have about 50 of these buttons on page at one time I am using a class to find them. $(".btnRemoveFave").find('.fa-heart').css('color', '#007c7a'); Now i believe why it wont find them is cause it is nested in a <i> the font awesome icon on a <span id="ctl00_BodyContentHolder_lblfavourite-xxxx"><button class="btnAddFave" id="btnAddFave_xxxx"
leaflet :receive value onclick event on marker.binbdpopup each time
I have an issue receiving data from my hyperlink to my on click function after bindpopup. Let me explain. First i receive a two dimensional array (data) from a json file .This array has lat and lng of markers plus some usernames which i want to put to the popups. So what i do is make a for loop for the markers to be added on the map , then bind the popups with them. This works. Now i want each popup to have a hyperlink inside ,each with a different name (that works too) and then when a user clicks
How do I get multiple results when I search a js object?
Hello, I have this script to list movie titles. At the moment it only shows 1 result, the search term has to be exact and if nothing is found the old value reamins. Here's What I have. Html: <form id="form"> <h3>Movie Search</h3> <input id="moviename" type="text"> <button class="btn" type="button" id="go">Search</button> <div id="placeHolder"></div> </form>Jquery: $(function() { var data = { "movies": [{ "title": "Aeroplane" },{ "title": "Back to the future" },{
Determine Internet Speed using JQuery
Hi, Is it possible to determine client internet speed using JQuery? How can I do that please? Thanks, Jassim
Not sure how to add a getcookie to a jquery script
I have a jquery script on a html page, however I would like to check to see if a cookie has been added first. If I add the line if (!$.cookie( "success" ) ) location="index.html"; to the following, nothing works. Can it be added? <script type="text/javascript"> // <![CDATA[ $(document).ready(function() { $.ajax({ type: "GET", url: "json/170826_rendezvous.json", //json file dataType: "json", success: function(json) {
Nested Ajax calls
I have a list of users (returned as JSON) and I want to dynamically generate a profile for each user. The user has a set of social media channels that differ for each user. There are two templates that I am using one for the profile and the other for each social channel. I am fine until I try to load the social channels. $(function () { if ($('#allMyPeeps').html() === '') { var userData = 'allMyPeeps.json'; $.getJSON({ url: userData.myPeeps, format: "json" }) .done(function( peeps ) { console.log(peeps);
How to fix clicking dont interfere one with another???
then i move move navigation style by clicking button applied the function (removing class and adding class). Link: https://codepen.io/psairidas/pen/YxOrwX move mob2 style > mob1, from function mob22 appears on mob1 style, I Fixed by using : nav.find("ul").removeAttr('class'); nav.find("li").removeAttr('class'); nav.find("a").removeAttr('class'); nav.find("ul").removeAttr('style'); nav.find("li").removeAttr('style'); nav.find("a").removeAttr('style'); I dont know
Multiple Datepicker
i am currently trying to develop an appointment book software. I have tried a field where i put in the name of the appointment and next to it is a Date picker. now i want to put in the name and select multiple dates on the Date picker but i don`t know how it works. i was thinking to pick multiple dates and they will be saved in an array or have you got better ideas?
sidebar slide to left problem
i have a sort of side bar that acts as a navigaton menu but i want it to be hidden to the left of the screen with only the little rectangle at the end sticking out so when the user hovers their mouse over it the whole thing slides out i have tried for ages but just cant get it to work.. i just ended up creating a mess. HTML <div class="navshell"> <img src="Images/Untitled-1.jpg" class="menuhover"> <div class="navmenu"> <nav id="primary_nav_wrap"> <ul> <li class="current">Home</li>
Ajax and Jquery -> not working !
Hi guys, My ajax code should change some html content and then display an alert box It should be easy but to be honest i can't understand why the lines in the "function(data, status)" are not executed $( document ).ready(function() { $("button:button").click(function(){ itemAction=$(this).attr('class'); $.post("[[~[[++ajax_page]]? &scheme=`full`]]",{ userId: 2, itemId: 7, itemAction: itemAction, ajax: 1, }, function(data,
Execute if function from typeof
Hi, I have below code to check if passed object is a function or not. I want to know how can I execute the function if it's a function no matter what function is passed? if (typeof e.itemData.onExecute === "function") { console.log("is function"); -------- EXECUTE THE FUNCTION --------- } else { console.log("is NOT function"); } Thanks, Jassim
jQuery Accordion "End"
I have an accordion setup with jQuery on my SharePoint site...my code is below When I collapse the last H2 header, everything below it collapses, to include my Web Parts, and other text. How do I "end" the accordion so that the remaining content on my site is not collapsed as well. <script language="javascript" type="text/javascript" src="WhatWhatWhat.com/SiteAssets/jquery-3.2.1.min.js"></script> <script language="javascript" type="text/javascript"> $(document).ready(function () { var inEditMode
Side bar slide off screen on scroll down and back on scroll up with hover to slide in
Hi. I have a side navigation bar which slides in when you hover over the long black bar on the side but i want it to be on screen by default when the user is at the top off the page and slide off with the same animation when the user scrolls down a certain amount but i also want the navbar to slide back in when the user hovers over the side just like it is now i watched many tutorials but none integrate well with what i want to do. HTML <div id="navbarhide"> <div id="navbar">
Getting text of a drop down for a text field
I have a drop down that is a list of addresses each separated by the delimiter ",". When an address is selected I need to split the address at the delimiter and place each part into corresponding text fields e.g. company name, address_1, address_2, etc. Here is my jsfiddle so far. I know Im headed in the right direction, but I can't get it to work. Any help would be appreciated. Also, I don't really know JS or jquery very well so keep that in mind. https://jsfiddle.net/yn37qe5a/3/
Change Page and Retain Page Scroll Active Class Functionality
Hi, On the Skull Biker template here, the Bootstrap nav menu links get highlighted when the id=”” tag is scrolled to. However, this only works if the anchor tag and the id tag are on the same page and if the anchor links start with a hash. <a class="page-scroll" href="#home">Home</a> <div Id=”home”></div> When I add a normal URL in front of the #, the functionality does not get carried forward to the new page. What I would like to is change page and still have the links highlighted when a corresponding
Mouseover hover Effect/Event for each div among multiple divs with same class
Hi, I am using php while loop to show comments on a page. and i have some css class for comment div. So every comment has the same css class Now the issue is, I am using a mouseover effect to show the dropdown options arrow to report or favorite a comment. but the mouseover effect is being shown only on the 1st comment even i am hovering the mouse on 2nd, 3rd or any other comment. arrow appears only on 1st comment I need a jquery help. i can post the pictures and html code as well if you ask me to
Next Page