regarding Collapsible Data Grid Plugin With jQuery - Treegrid
I am using this plugin.Its working fine. But sometimes the node which it creates does not expand. I did a debug of jquery.grid.js . And found out that _expanderClick() function is getting called multiple times in the cases when node doen't expand. Although the html for tr and child tr are getting loaded fully. Can anyone help me with this issue.
Custom ajax error message translation
I'm using jQuery Validation Plugin v1.16.0 in zend framework 2, I want to display transalted custom message in the jQuery error. My message is converted in chinese from the Form error message but not display properly in front end. For example my message is : Please enter valid email Should be like : 请输入有效的电子邮件 But it is now as : u8bf7u8f93u5165u6709u6548u7684u7535u5b50u90aeu4ef6
Mini silder show error, how to fix it?
I used code like these: <div data-role="fieldcontain"> <label for="silder2">mini silder:</label> <input type="range" name="silder2" id="silder2" data-mini="true" data-highlight="true" value="40" min="0" max="100" /> </div> but it show not good, like this pictrue. I found it may be a jquery version problem. In jquery.mobile-1.3.2,it works well. but in jquery.mobile-1.4.5,it wors error like this picture. How to fix it? please help me.
Create a new table with rows of only checked checkboxes
Hello! I have an HTML table with a checkbox in each row. I want to loop over the table and if there are any checkboxes that are checked. I need to create a new table with rows of only checked checkboxes. Any advice will be appreciated! I know how to go through the table. But how to store HTML code of that row in the variable? What I am trying to do is to send new table to a new page. function toView(){ var newWindow = window.open(); var newHTML = '<html><head></head><body><table>'; var endHtml =
Need help in updating the existing Jquery plugin.
Hello All, I have implemented one jquery plugin. below is the plugin. http://www.jqueryscript.net/other/Easy-Any-Content-Pagination-Plugin-jQuery-Paginate-js.html using above plugin i have generated the dynamic list of ul using below js code. function FetchData() {
$.ajax({
......
success: function (r) {
$.each(JSON.parse(data), function (key, result) {
// appending data in ul.
}
});
SetPaginate();
}
});}
function SetPaginate() {
$('#locationdata').paginate({
How to keep elements hide() show() states on page load?
Hello, I have a CRUD in PHP where the user selects 2 options in a dropdown menu, based on the select 1 field or another shows up where the user input a number. My problem is this: If the user choose choice 2 which shows input 2 and send the information to my databasem on the next page load the php will show the choice 2 but the input will not show up until I click again on the dropdown menu... How to get jquery to load automatically based on the dropdown selection please? Here is my code: $j(document).ready(function(){
It is possible to trigger a keyboard shortcut or action with a click?
The spacebar key currently scrolls any browser page down if you hit it. It is possible to bind or trigger the spacebar on a click? $("body").on("click", function(){ var e = jQuery.Event("keydown"); e.which = 32; $(this).trigger(e); });
drag & drop file upload question
Hi, The following jQuery drag & drop demo is interesting. http://smoothprogramming.com/javascript/demo-file-upload-using-drag-drop/ In the meantime, it's only half of a real function, that is, we need to upload the dropped file onto the server as well. I've looked at some samples on form data passing with with $.post() function, however, I'm stumbled with two issues. (1) for regular form data, it can be handled like $('#formID').serialize(); but in this case, the form data is a file, which can be
a variable loads a set of values
Hello, I want to implement this logic, but I am just starting. May be someone can help? A page www.website.com/products.php shows a few products and their prices, taken from the default price array. This website can show a different sets of prices, taken from other arrays. The set used is determined by a variable, passed in URL. A consultant sends his prospective customer a link with a variable attached, e.g. www.website.com/products.php?c=85a29. The customer clicks on the link and the page loads.
Animation failing to play on initial load
Hi, I have a slider on my front page. I'm using CSS animation to trigger a slow pan in effect on the background image. The animation only starts to work on the second slide. Is there a way that I can force it to trigger on the first slide? At the moment CSS looks for the following class name, which is applied to the first slide on page load. Perhaps it's because the CSS is loading before the Javascript? Or vice versa? Here is the code I'm using and the website in question: http://www.glowdigital.net
jQuery not working on WordPress mobile menu
Hi, I'm trying to use a jQuery function on the mobile menu but everything I try fails to work. I've done a test using a simple hover alert message. When in desktop mode and rolling over 'Home' the alert message displays. However, when I reduce the window down to mobile and rollover 'Home' the alert message fails to show. If I move the jQuery selector tag to say the Logo, burger menu or search icon it shows on both the desktop and mobile. For some reason anything inside the 'mobile menu container'
calling auto complete source not working
I have 2 radio button. 1) rdoWindows 2) rdoUnix i want to the autocomplete source to load only when rdoWindows checked. With this code the auto complete source loading even when rdoUnix is checked. Why is that? <script type="text/javascript"> $(document).ready( function () { $('#HostName').keypress( function () { var value = document.getElementById('HostName').value; if ($('#HostName[document_type]').val() != '') {
<audio> A-B repeat. Function not defined error
I am trying to add an A-B repeat function to my audio player, but I am getting: setA is not defined error. This is the html for the buttons: <div id="repeatControl"> <button onclick="setA()" id="btnAtime">A</button> <button onclick="setB()" id="btnBtime">B</button> <button onclick="clearAb()">X</button> </div> This is the full script to control the playlist and the A-B repeat function: $(function(next) { // Setup the player to autoplay the next track var a = audiojs.createAll({
Jquery: masonry and overlay (featherlight)
I coded the whole masonry layout with Isotope with help of this (https://codepen.io/Goji/pen/Kpgegd ) This worked out great, and I made several categories. I wanted the images to have an overlay when you click on it, so I used this code: https://codepen.io/HVinh/pen/xwmVJb But I don't know how to select the overlay from the css in my for loops. It's probably very easy, something with .find('.overlay') but I don't know where to place it. This is the code; I've only applied it to category 0 so far.
Unable to delete default inputmask percentage value
Hello Team, I am using inputmask plugin to allow user to enter percentage value with default % as the placeholder However when i am trying to delete default 0.00 it is not allowing me to delete. Could you please tell how to allow user to delete this 0.00 value by using backspace or delete key. Please find source Demo Code
truncate text in specific class
Hi. I'm using a WordPress plugin that returns date/time information like this, multiple times on a page: <div class="eventsdate"> <span class="events-date-start">September 25 @ 9:30 am</span> <span class="events-date-end">September 28 @ 4:30 pm</span> </div> But I only want the date part. how can Jquery shorten the two spans to just say September 25 and September 28? Thanks in advance for the help.
jquery validate: Changing tab header's color if error exist ,(urgent solution)
if any error has in tab ,the tab should be highlighted with some color . thanks & Regards, Learner.
jQueryUI Datepicker: Show one date format to user, use another date format in the background(I have done this bit)
I need help and can't figure this out.I can get the format date i want(2017-02-13) yy-mm-dd and use it in my codeno problem but i don't want to display this to users.I want to display dd/mm/yyyy. Not sure what i'm missing tried everything below as you can see See my code below:- $('#dateto').datepicker({ altField: "#_dateto", altFormat: 'dd/mm/yy', dateFormat: 'yy-mm-dd', showOn: 'button', buttonText: 'Select Date', //buttonImageOnly:
Huge chars data is not going through ajax call to server
huge chars data is not going through ajax call and I can able to see the chars in request body in browsers debug tools. If I send few chars I can able to receive it in server side!! ajax call : jQuery.ajax({ url : "/RegisterServlet_2/servlet/Register", type : "POST", data: "img="+compressed, cache : false, async : false, success : function() { }, error : function() { } }); Fyi, I don't want to send as json
How to create a screenshot
I want to capture a screenshot of a graph by clicking on it from different websites,image is inside a tabbed pane.I tried using phantomjs but i am not getting how to get the element selector by clicking on website.Is there any way i can achieve it.
Pass List in data attribute and access using jquery
Im currently having a User bean and a Role bean. Role{ private String roleName; private boolean readOnly; } User{ private String name; private int id; private List<Role> roles; } From the controller i pass the list of users as: List<User> userList = daoFactory.listUsers(); request.setAttribute("userList ", userList); In the jsp i have set the options based on the userList <select id="approvedUserList" class="selectUser" size="5"> <c:forEach items="${userList}" var="i" varStatus="loopStatus">
How can I switch Play Button in Js Image Slider when it stop from looping?
I'm programming a js image slider. I made a script to stop the loop, but when it stop there's still the pause button visible, even though I can click on it and the slider start again. I think I need a script for it. I post the code. Here it's the js in the body: //The following script is for the group 2 navigation buttons. function switchAutoAdvance() { imageSlider.switchAuto(); switchPlayPauseClass(); } function switchPlayPauseClass() {
Attempting to "clear" or "reset" drop-down selectors
Hello all, I'm trying to set up a function on button click that will reset currently selectors with selected values back to the default or first selection of "(All)". Here is the code I'm trying that doesn't seem to work: $('div[k="W10573"]').click(function(){ $('div[k="W6038"]').val($('div[k="W6038"]')[0].defaultValue); }); with W10573 being the button and W6038 being the selector. I know the button is working as I tested it with an alert("TEST"); which worked
Row identifier in jQuery
Can we access a row of a table only if it's updated by jQuery? A table is rendered to JSP UI. The table has data and approved combo box with yes/No values at each row. So each row in the table may or may not be updated. Only if a row is updated then that particular row is identified and will be sent to update to database through a hibernate session. Can we access each row of a table in jQuery in any way ?
beforeSend not working with async
Hi, I am using below ajax with async = false but my issue is it is not showing the loading panel in beforeSend. However, if I change async to true then beforeSend will show the loading panel. How can I overcome this issue? // Savanna.ShowLoading(true, "Please wait.."); var formData = new FormData(); formData.append("customer_id", customer_id); $.ajax({ type: "POST", url: "https://www.domain.com/get_customer_by_id.php", async: false, data: formData, dataType: "json", processData:
Need latitude and longitude from centre of a city
https://maps.googleapis.com/maps/api/geocode/json?address=chennai,india i need a lat long of each bounds from city centre ex: center to north, center to east, center to west, center to south
Jquery Widget - where to put code for 2nd link to remote javascript...
I have written a widget and it works great, but right now I am giving my users a link to a remote script, a link to my script and a div to place on their page. I would like to reduce this to just a link to my script and the div. The remote link I want to include in my code below is <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> Can anyone please educate me on how and where to add this link to jquery-ui.js link in my code? I already link to a remote jquery and a remote stylesheet,
Using multiple elements with variables
Hi, I know that I can apply multiple elements like this: $('.element-1', '.element-2').show(); But if I put those elements in variables like this: var $elem-1 = $('.element-1'), $elem-2 = $('.element-2'); How should I change this: $('.element-1', '.element-2').show(); to use with those variables? Thanks
Trying to trigger an ajax call
Hi Folks, I'm trying to call a controller with an Ajax request though the url user/MyAjaxCall. console.log() prints some irrelevant url as and call not biked. Please give me a clue to proceed and I'm struck. Below is the code. I'm trying package net.practice; @Controller @RequestMapping(value = "/user") public class UserController { @RequestMapping( value = "/MyAjaxCall", method = RequestMethod.POST) @ResponseBody public String MyAjaxCall(@RequestBody User usrObject, @ModelAttribute("model")
Jquery Tab Widget Losing Formatting
I built this same tabbed system using PHP and it works great, now I am trying to get it to work as Jquery and am *almost* there! I am trying to load my well-formatted JSON data into a tabbed structure. So far the data is in and showing up where it should. My problem is that the style is being dropped from the li element and I believe it is because of how I set up my javascript in the JQuery.each section. Does anyone have any idea how I can fix this? Here is the function I use to callback the data:
Jquery, JSON and tabs
I am new to JQuery and need some help understanding how to structure my code... I have a working JSON page and have been able to get my code to display the intended results. Now I want to put those results in a tabbed format. Basically the title of my article is in the tab and the body of the article underneath. My code right now shows all of the titles in the tabbed area up top, which is correct, now I need to get the body in the main part. The final structure should look like this: <div id="tabs">
Display inside tag correctly
I have seen a lot about parent tags, and I really do not understand the reason for not returning the result correctly within the id informed. In my test I have two columns with class `.col`, one column has the form, and the other column contains the table list. Form And table list All page content displayed within the id = "ajaxList". The screen looks like this after the first click, and clicking on the other links ajax continues to load the correct contents of each number. Jquery $(".page-link").click(function
Using Croppic Plugin !!!
var croppicHeaderOptions = { doubleZoomControls:false, rotateControls:false, cropUrl:'/Web_Service/ImageUpload.php', cropData:{ "ID":localStorage.getItem('Id'), "token":localStorage.getItem('token') }, customUploadButtonId:'cropContainerHeaderButton', modal:false, imgEyecandy:true, imgEyecandyOpacity:0, processInline:true, loaderHtml:'<div class="loader bubblingG"><span id="bubblingG_1"></span><span id="bubblingG_2"></span><span id="bubblingG_3"></span></div> ', onBeforeImgUpload: function(){ console.log('onBeforeImgUpload')
How can I use jQuery plugins predefined events?
How can I use jQuery plugins predefined events? Most of jQuery Plugins introduce predefined events in their documentations, Is there any general standard rules for implementing those events? For example in special case Zebra Accordion plugin (a tiny accordion plugin for jQuery) or any other plugin defines some Events like below: Zebra Accordion Events: onClose: Event fired after a tab is collapsed. onOpen: Event fired after a tab is collapsed. If I want in this case to add a div with special font
Issue with displaying array values with static text
Hello all, I have another question connected to my question from yesterday involving the array issue that Jake was kind enough to help out with. Here was the code from yesterday to establish the array from a multi-select: var test = $('div[k="W8748"] .elem').map(function(){ return $(this).text() }).get(); This works great for grabbing the values but what I'm trying to do now is essentially be able to display those values with some static text attached. Example below. I have two values
Start one animation after the other is finished (infinitive)
Hi, Looking at this Pen: Animation I like to achieve that the animation of the second element starts only after the animation of the first element is finished. When the animation of the second element is finished, the animation of the third element should start and so on (infinitive). Please feel free to change the code as you wish. Thanks
textarea and/or its div parent not responding to mouse events
Click, mouse up, etc do not seem to be working correctly. Kind of at a loss as to why jQuery is not attaching the events correctly, and/or firing them upon the events. Keyboard navigation seems to work just fine; handling the tab keys, arrow keys, and so on, works just fine; I am able to select the container div and drill into the textarea within to give it focus. No problems there. However, how come the mouse events not work properly, not firing on the elements for which I've attached them? Apparently
Update Jquery version form 1.8.3 to 3.2.1,All ajax calll fails
Hello, I have updated Version of Jquery from 1.8.3 to 3.2.1.My project fully developed and all Ajax works fine in 1.8.3.But after upgrade version all Ajax call fails.it says 401 Unauthorized in response. I have no authentication process. So whats problem? Sample Ajax looks like...(which was works fine in 1.8.3,but same code not works after upgrade) jQuery.ajax({ type: 'POST', contentType: 'application/json; charset=utf-8', dataType: 'JSON', url:
Target escaped div string
Trying to target a div that may have some special characters in it & then change it's srcset. Everything is coming in correctly, so it's just the targeting part that I need help with. I broke it down into parts to be able to concatenate & then target it: var smdiv = 'mydiv_rowset_'+rowset+'_'+mydata[rowset].fieldNames[k]; var smesc = smdiv.replace(/[!"#$%&'()*+,.\/:;<=>?@[\\\]^`{|}~]/g, "\\\\$&"); var smimgsrc = ' source\\\\.img2xsm'; var small = '\\\\#'+smesc+smimgsrc; console.log('SmImg-small:
Need help with possible array situation
Hi all, My issue today is that I have a search box selector and I'm trying to find a way to: A) Find out if there are any values present B) If they are present, how many are there ie.. >1 C) How can I grab all of the values to display? I have a snippet from the HTML. I'm thinking I need some sort of For Loop or something along those lines, but I'm not sure how to get it started. In the case below, I can get it to display the first value "32421" by looking at the ".elem" class, and if it's the
Next Page