accordion in a table form....
I am new to this.... but I have application which we use to make notes for another program. I have a form with a table inside of it. I can use this code to toggle sections of the table but when you open the form this will only allow the sections to be collapsed. I would like to be able to have some sections expanded and some collapsed, but still be able to control with a click. This code work good for the clicking part but I have not figured out how to get the control I would like. I know there has
Needing help getting $(this).find to work.
Hi, I'm having problems getting $(this).find('.thumbs-up').html(data + status); to write to the element. any suggestions would be helpful. I'm trying to use this in Cordova so I can't have any php on my page so I have to call everything via ajax. I'm trying to make and up vote and down vote system. Thanks. <!DOCTYPE html> <html> <head> <title></title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" /> <script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
Validation in each step of the multi-step form
I´m creating a multi-step form using bootstrap and jquery with 4 steps. But I want that in each step validate the required fields, that is, the button to go to the next step should only work if the required fields are not empty. But I´m not having success implementing this part of validating each step the required fields. Do you know how to do that? Working example: https://jsfiddle.net/4vzf9qgr/2/ Jquery: $(function(){ // navigation buttons $('a.nav-link').on('show.bs.tab',
How to use a php function inside jquery
Hello, I'm writing a comment system and i encountered a problem which is, after fetching users comments from db, I used jquery to display the comment, which I have a php function inside the jquery to help me fetch users username but is not working, please I need help. Here is my code $.post("getcomment.php", function listComment() { function (data) { var data = JSON.parse(data);
Scroll to anchor in an <a> tag using sudoSlider
Hi, I got this problem that got me pulling all my hair out. A link <a class="customLink" data-sudo-rel="1">section1</a> Will make the sudoSlider slide to the correct info but when adding the href="#processinfo" like so : <a class="customLink" data-sudo-rel="1" href="#processinfo">section1</a> Stops making it work as intended. The reason i want to add <href="#processinfo"> is, in case small screens, the information will be actually shown, instead its shown outside the visible part. jsfiddle
Combining Functions Issue
I am trying to make a function that has 2 functions within it. Here it works fine: var bothFunctions = function(){//combine 2 function variables checkCats(); checkCatVal(); }; $('#q119').on('change', bothFunctions); The functions them selves are performing some logic on a drop down list. I tried using this technique on aother 2 functions that are performing logic based on a checkbox: var bothFunctions = function(){//combine 2 function variables checkPCardCheck; checkPCardVal;
jquery plugin when using specific browswers
In a web form application, I just updated the application to use the latest JQuery UI that I believe is a plugin. This .net web form application only runs using Mozilla Firefox. When I look at the following link for Mozilla Firefox from the following url: https://www.mozilla.org/en-US/firefox/52.0/releasenotes/ , I see that plugins are affected. Thus can you tell me if the new version of the Firefox browser that is scheduled for March 7will affect the JQuery UI or not? If there is a problem, would
Get element from parameter in function
Hi Everyone, I have to be missing something pretty obvious, but I am out of ideas. I am trying to get the tr from a table (#q34). I am (attempting) to pass the table name as a parameter in to a function. I could be doing a number of things incorrectly as I am a complete noob. here I am trying to pass the parameter #q34: $('.pCardUsedReg input').on('change', function(){ checkPCardCheck("#q34"); Here I trying to use the parameter as if it was text: var checkPCardCheck = function(x){ var totalRows
change checked not working
Hi ! my actual code is not working, the checkbox is not checked as expected HTML <fieldset id="jform_featured" class="btn-group btn-group-yesno radio"> <input type="radio" id="jform_featured0" name="jform[featured]" value="1"> <label for="jform_featured0" class="btn">Yes</label> <input type="radio" id="jform_featured1" name="jform[featured]" value="0" checked="checked"> <label for="jform_featured1" class="btn active btn-danger">No</label> </fieldset> JQuery <script> jQuery(function ($) { $(document).ready(function()
How to trigger an event when bootstrap modal closes
Hello, I want to reset value when modal pop up close. I am able to reset value, when click on cancel button and cross icon in modal pop up but how can I reset value when click outside modal click? How to trigger an event when bootstrap modal closes? hidden.bs.modal and hide.bs.modal not working for me. Thanks.
How to load portlets without reloading the page?
I'm doing a MVC project using a Metronic template. When I click on a menu I want to load the portlet correctly with the data that goes inside, without reloading the page. Now I have an index.php which when opening the first time loads a menu and in the central part this empty, until here well.When I click on the Clients to create a portlet of clients with their data and when I click on New Client create another portlet with its data. This part I get through an ajax that I have created and that I
Run code block only to specific pathname type
I am writing a userscript I have a working code block I want to run ONLY on pages that match the following address: https://www.example.org/administrator/products/1971/edit where 1971 can be any number I assume I need to do a regEx expression. e.g. window.location.href.match(/(.*)(\/\d*)/)[1] I apologise that this is a general js question. I tend to get abuse on stackoverflow so I avoid it, love jQuery and any jQuery based solution would be welcome.
How To convert SharePoint 2013 New/Edit form to Accordion
Hi All, SharePoint forms is in table form,Can anyone having any jquery plugin/code to convert SharePoint 2013 forms into accordion?
update ajax on browsers back & refresh button is trigger
down votefavorite Its my first web application building with jsp , jstl using ajax as to make music player play throughout the site. i have many ajax req in single page . when i click on that its works all fine but when ever i refresh it takes me to blank content page in this code "Djpage.jsp" with out any content as requested in ajax i know as for url it will show but i researched a lot and tried but its not working and when i click button it does not respond only url is changed . Need help and
Jquery Conflict With Content Security Policy
As we all know when using jquery or jquery ui especially, it often put an inline style in element's tag, for the simplest example; when we implement .hide() on element, it put an inline style="display:none;" on the element. On the other hand Content Security Policy Best practice dictates that we must not allow for 'unsafe-inline' in our policy. How to get workaround for this problem? How can we use jquery, without white listing 'unsafe-inline' in style-src?
Help needed on jQuery Vulnerability
Hello All, I have received a Vulnerability point from our security team. Details are as below. Please help on how to fix. Vulnerability: Vulnerable Javascript Library (jQuery) Affected URL: https://sitename/js/jquery-1.7.2.min.js Description: A cross-site scripting (XSS) flaw was found in the way jQuery, a fast, small, and feature-richJavaScript library, performed sanitization of location.hash and <tag> arguments in certaincircumstances. Impact: A malicious user can provide a specially-crafted web
Populate Object Values in HTML Span
I am populating a span based on the values from an object. var myData =[ { "ID":1417, "BF":74, "IL":17, "Tw":17 }, { "ID":1415, "BF":63, "IL":7, "Tw":19 }, { "ID":1414, "BF":297, "IL":2, "Tw":30 } ] I want to read values from this JavaScript object and populate it in the HTML given in the demo https://jsfiddle.net/qwejzkgs/3/ There are several such parent divs on the page, each with a unique id. I want to populate the span with the respective data from the object. How do I access the span inside
using operator
hi, please anyone give an idea. how to write if condition using OR operator i.e the given value may or may not be positive
Load JSON data into HTML table
Below is my AJAX call response JSON --- jsonObj = { "name": "Top 5 Retail Sales - May 2017 - US", "rows": [ "{\"dealershipName\":\"VIJAY ROAD EQUIPMENT, INC.\",\"numberofUnits\":\"20\",\"salesRepName\":\"DAVE HOLZWARTH\"}", "{\"dealershipName\":\"GRAND TRAVERSE DIESEL SERVICE, INC.\",\"numberofUnits\":\"13\",\"salesRepName\":\"DANIEL WALTERS\"}", "{\"dealershipName\":\"BUCKEYE WESTERN STAR\",\"numberofUnits\":\"12\",\"salesRepName\":\"BRANDON CREEK\"}", "{\"dealershipName\":\"FREIGHTLINER
Control radio button group using checkbox?
I have one checkbox and four radio buttons.Initially if user select checkbox dynamically first radio button get checked and also display value.After that all radio buttons switch with each other and display value.Whatever radio buttons checked get uncheck ,If user unselect the checkbox. This work like parent and child relation,checkbox as parent and radio buttons as child. My code is working but the problem is that,if dynamically particulate radio button is selected then it will not unselect and
Get text inside Div with others elements
Hi all. Thanks for your attention and help. <div data-filter="*" class="cbp-filter-item-active cbp-filter-item"> Todas <div class="cbp-filter-counter">12</div> </div> I use .find('div:eq(0)').text() I get all text inside this div like "Todas" and "12" but I want select or get only "Todas" Are there a simple way or I need to use a split metthod with new lines? thanks
Selector Troubles
Howdy all. Can't seem to get my mind wrapped around this one. I have a webpage built with Bootstrap CSS (so lots of nested DIVs). What I'm trying to do is to show the user some information that is provided by the database, and to allow them to one-click copy that information into an adjacent field. I'm thinking this should be easy, however no matter how I build the selector, I can't get it to copy the information into the field. It's too complicated to put here, so I've built a fiddle to illustrate
Intercept response that have header
I would like to intercept all responses from jquery and check if a http header is present. If it is, i just want to do another request ( that hopefully wont trigger the jquery http interceptor somehow. )
How to assign the dynamic id of the div using create element
I need to assign the dynamic id of the div, here is my code; $('#btClickMe').click(function () { var dynamic_div = $(document.createElement('div1')).css({ border: '1px solid', position: 'absolute', left: '350',//element_pos1, top: 110,// $('#ctl00_BodyContent_divResize').height() + 20, width: '25', height: '25', url: '', padding: '2', margin: '50', });
Building a form with JSON and Ajax
Hi, Looking at this example, I managed to create a drop-down menu which gets its content from a JSON file: Building a from using JSON However, I'm sure there is a better way to achieve this. Could you please show me how would you solve this? Thank you
Multiple sliders on one page
I've been using the same sliders on my website for years, but they've just stopped sliding? I usually just cut and paste the code from one slider and change the images and it has worked fine for years? See the code on my website: www.quentindevine.com Any help in resolving would be very appreciated, thanks!
jquery dialog dosnt work
Hi all, i'm new to jquery and javascript too; the following example do not work; I've copied the file at the end of this page: http://api.jqueryui.com/1.8/dialog/ Save it in a file try.html, but when i open it i see the buttom and also the text I'm a dialog, and when i click on the button nothing happen. thanks
Jquery Datatable horizontal scroll is not consistent in IE11
Hello All, I am using jquery Datatable in my web page. But with IE11 browser, when i resize my window to minimal size(mobile view), it's displaying without horizontal scrollbar. i.e horizontal scroll bar is not consistent(sometimes appearing, sometimes not appearing). In chrome and firefox, it's working fine. Only in IE11 i am facing this problem. Please help me how to fix this fixed horizontal scroll bar issue in IE11 Thanks in advance chandu
Adding lang="la" attributes to table cells without affecting already hardcoded lang="en" attributes?
Hello. I'm building a Wordpress website about Latin (but this isn't a Wordpress question!). I'm building tables directly in the content editor. I need to add lang attributes to table cells. My first try was adding latin="la" to all table cells: $(".my-table td").attr("lang", "la"); This worked fine, but I realised later that certain cells needed to be in English so I installed a plugin that allows the lang attribute (lang="en-GB") to be added to individual cells (i.e. they are hard-coded into the
Click function not fire on first time page load
Hi everybody, I am using jQuery to bind an event on element click, like this: jQuery('.product-info-main-content .product-add-form .details-qty .plus').click(function(){
var val = parseInt(jQuery(this).closest('.control').find('input#qty').val());
jQuery(this).closest('.control').find('input#qty').val(val+1);
}); But, the problem is that code not working at the first time page load, I try to refresh the page and it work perfectly. And one more except that if at the first time page load, I open
Finding a comma and replacing with span tags to style the text differently
I am trying to write a script that replaces a comma in a different font. Nice commas. <!-- CSS --> .nicecom { font-family: 'Freight Big Pro'; } function initNiceCom() { $('#container').text(function (index, text) { return text.replace(',', '<span class="nicecom">,</span>'); }); } I am searching the #container div for a "," and then replacing it by wrapping around <span></span> tags. My script has no effect. Any ideas how I can achieve this?
toggle function to limited tags on click event
I have 10 boxes, I have added toggle functions to it to select the box by adding class 'active'. I want to let user to select only 6 boxes. When user selects 6 boxes it not letting to select others which is working fine. My problem is I want to change my selection again but it is not letting me to do that. Below is code: $('a').click(function(){ if($('.active').length < 6) { $(this).toggleClass('active') } })I want to change my selection, please help!
Show and Hide Code
I attached two screenshots, actually I am new and confuse a lot, I tried to figure but failed. Actually in the image you can see, that keyboard opacity is low and it's selected as well, and rest of other objects are unselected and with full opacity. I want vie versa of this syntax, that when I select any specific object it will remain highlighted and rest of all will remain with low opacity. Hope you got my question and will help me in this.
Click button add object to div
This app loads a google map and displays local breweries. Once a brewery is clicked, it loads basic info and a "Add to pub list" button. I cannot seem to get the details.name object to append the list in div on the right. Can anyone shed light on my error? The styles now are hideous, pay no attention :) I appreciate any direction, thanks! I have my source here: https://repl.it/@Sugalo23/Brewski-Plat-1
simple problem
Hello, Can anyone help me? I have to do the below but i can't. I need to draw on the left side of Canvas a cowboy with a gun. Once a page is loaded, a bullet will drop off the gun. The sphere will be reflected on a wall that is near the right side wall. When the ball strikes the cowboy, he will fall to the ground and a message "this was a mistake!" Will appear. The message will appear above the head of the cowboy. If anyone can help me, i will be very thankful.
Issue with Google Maps API in External JS file
I have put my script in the script tag and the picture loads. However in the js file the the image is blank. See my code function initMap() { var location = {lat: 61.109, lng: 22.100}; var map = new google.maps.Map(document.getElementById('map'), { zoom: 8, center: location }); var marker = new google.maps.Marker({ position: location, map: map }); marker.set(map); } initMap()
Tumblr - Randomizing blog post order
Hello, I am completely new to coding, html java and etc. I have recently reated a blog that showcases my photography. However the theme that I have installed and Tumblrs default orders my photo blog posts in chronological order by date. I am looking to change this to randomizing the appearance of my photo blog posts so that upon every load of the page the user will have a change to view my 100+ amazing photos. Anyone have a javascript code I can copy and paste into my tumblr html code? I read online
Custom Checkbox & Draggable
I have to use a checkbox from a 3rd party library. That library creates checkboxes using the custom checkbox from Khavilo Dmitry. That checkbox has the following code for mousedown $('img', ch.wrapper).bind('dragstart', function () { return false; }).bind('mousedown', function () { return false; }); Now I need this checkbox to be draggable. Since I do not have control over this 3rd party library, I wrapped the checkbox into a div like <div id="checkboxID" draggable="true" ondragstart="dragStart(event)">
Multiple forms
Hey everyone hope your all well and can help me get my head round this situation i have Ok so im currently printing out some placeholders / div blocks in a while loop using php which have forms within them, to access the forms you have to toggle the div for each of the blocks, that all works flawlessly. My issue is i need to try and validate which ever form the user has toggled into view to input there details which is just a name and email and then allow them values to be passed back to a php script
Get variables after ajax finishes
I'm trying to get at variables returned from an ajax. Found out that those variables aren't available outside the function, so I wrote those variables to data attributes & then trying to call those later. function myajaxcall() { var v = new Array(); $.ajax({ url: "pathto/check.php", dataType: "json" }).done (function(check) { v = check; console.log('v Inside: ' , v); // Getting correct values, BUT it's running twice, for some reason? $('#mycheck').attr({'data-uflag':
Next Page