I want to know number of "DIV"'s are displayed
Dear Sir/Madam Pls refer http://jsfiddle.net/yap3ujz9/ This is a simple jquery program that allows user to update email Id's I want to know , after each update or click on Save Email Id button I want to know number of DIV with class ='supplierblock' are displayed
can't step into for each loop in Firefox Debugger
I'm trying to do an $.each on a json object, but when debugging in Firefox it's just steps over this code, like something goes wrong. Code: var query = { name: "test" }; $.each(query, function (k, v) { if (i === 1) { tmp = "?"; } else { tmp += "&"; } tmp += k + "=" + v; i++; }); Am I using $.each wrong?
malsup jQuery Form: Upload Progress doesn't perform as expected
I have excel file upload function. The main problem is the uploadProgress doesn't show its progress as it should be. It's just an instant from 0 to 100% progress, doesn't indicate there's upload progress on my website. The upload progress just straightaway to 100% before the server is running an upload process, it's not concurrent. Anyway after my website is successfully ran the upload progress, it throws the success function. With the current upload progress state, my website just looks static when
Jquery Table Edit
Appreciate if i get the answerHow can i change (' sub' below nr 4) from text into select with option which is selecting from db table? while editing ?? $('#editable_table').Tabledit({ url:'masrafsave.php', columns:{ identifier:[0, "id"], editable:[[3, 'no'], [4, 'sub']] }, restoreButton:false, onSuccess:function(data, textStatus, jqXHR) { if(data.action == 'delete') { $('#'+data.id).remove(); } } });
jQuery v3.3.1 IE 11.0.45 SyntaxError...
Hello, I searched the forum but no joy. This error appears frequently. Ideas? Thanks, Mark
Set specific href for each tab
Hi. I want to set my href for each tab. Here's my code: <ul class="category-account"> <li class="tablinks" onclick="openTab(event, 'Home')" id="defaultOpen"><a href="#home" class="justify-content-between align-items-center d-flex"><h6><i class="fa fa-cogs" style="width: 20px;"></i>General</h6></a></li> <li class="tablinks" onclick="openTab(event, 'Logsec')"><a href="#logsec" class="justify-content-between align-items-center d-flex"><h6><i class="fa fa-shield" style="width: 20px;"></i>Login Security</h6></a></li>
How to merge selected table cells on button click using j query.
I have created a dynamic table and selecting the table cells using j query. Now i want to merge the selected table cells on button click. How can i do this. Thanks, Regards. function CreateTable() { var rowCtr; var cellCtr; var rowCnt; var cellCnt; var myTableDiv = document.getElementById("myDynamicTable"); var table = document.createElement('Table'); table.border = '1'; table.id = 'myTable';
Select only childs contained inside its parent
Hello, I created this simple jquery -> http://jsfiddle.net/psytanium/6D9kS/401/ I'm very beginner with this language, I'm trying to clear all check boxes when "All options" is checked, and vice versa. I'ts working fine, but it is affecting the other forms too. The problem is I have multiple forms, I need to apply this script to each form separately. Thanks :)
Jquery Sortable elements get “stuck” during sorting
Have a situation here, where I have to sort for dom elements where users can sort the items. In some cases when sorting when I try to drop it in the desired position it gets stuck like below. Below is the code that I am using for the sorting. Video recording of the issue. both "stop" & "beforeStop" are not triggered some times. $(sortableSelector).sortable({ placeholder: "sc-highlight", tolerance: "pointer", cursorAt: { top: 25, left: 25 }, connectWith: connectWithItem,
How to merge selected table cells using j query.
I have created a dynamic table based on user input using c#, and written jquery to select the table cells this is working fine. Now i want merge the selected those table cells using j query or java script. how can i do this? C Thanks, Regards. Code Behind: private void CreateTable() { int rowCtr; int cellCtr; int rowCount; int cellCount; Table Table1 = new Table(); Table1.ID = "myTable"; rowCount
Looking for good tutorials on building a website with jQuery
Hello everyone, I am new to jQuery. I currently know the basics of HTML5, CSS3, PHP, MySQL, JavaScript and jQuery. I am looking to dive into Angular and React further down the track. Ideally I would like to find somewhere that teaches jQuery throughout building a website. Question:- Should I dive into basics of angular, react or AJAX before I start?? Any tips would be great thanks!
Function not being called on dialog open
I would like the function dialog_close() to be called when the dialog opens. The web page has two buttons, one to open the dialog and the other to close the dialog. These buttons are just for testing, for now. If you click the OPEN button the dialog opens but it never closes. If you then click the CLOSE button the dialog closes after a 3 second delay. If you then click the OPEN button again, the dialog opens again. But, clicking the CLOSE button again does not cause the dialog to close, and
DOM Multi Level Filtering based on Different Data Attributes
Can you please take a look at This Demo and let me know how I can enrich my code to have multi level filtering system based on different existing and potential upcomming data attributes? As you can see I am trying to filter the .box based on two data attributes shape and color but my code is filtering the DOM separately. Can you please let me know how I fix this? $('input:checkbox[name=shape]').on('change', function() { if ( $('input:checkbox[name=shape]:checked').length > 0) { $(".box").each(function(){
Unable to read value from hidden field post JQuery 3.3.1 upgrade
Dear team, We have used Knockout library along with JQuery in one of the page. We are binding hidden field with a value from model in cshtml page: <input id="OrderId" type="hidden" value="@Json.Encode(Model.OrderList.Select(it => new { it.ItemDescription, it.ItemId}))" /> and then reading the value in js and assigning to observable like: self.OrderList(JSON.parse($("#OrderId").val())); Post jquery upgrade, $("#OrderId").val() does not returns anything 'undefined' Can you please help me what needs
??? jquery $.ajax result is displayed in browser
I use by example but am not an expert using jquery. I have a jquery that does a uses a $.ajax and the remote programs runs as expected but its json encoded response is displayed on the browser instead of allowing the calling program to continue. My function looks like this: $('#file_upload').submit(function(e) { e.preventDefault(); var url = document.getElementById("url").value; var formData = new FormData($('#file_upload')[0]); $.ajax({ url: 'cd-file-uploaderX.php',
re: jquery sumo multiselect select
i am using jquery sumo select control and i want to use this control inside table and click on add need to add new row and remove row.but when i try to add row data is cloning to next row. and max selet option should be 1. but when adding new row data is not binding to the control. http://jsfiddle.net/p89ka9jq/930/
I can't get my jquery accordion css menu to drop down.
Here is my code code pen My php add_action('wp_enqueue_scripts', 'ho_nav_js'); function ho_nav_js() { wp_enqueue_style('ho-nav-main-style', get_template_directory_uri() . '/js/style.css'); wp_enqueue_script('ho-nav-main', get_template_directory_uri() . '/js/ho-nav-main.js'); } class HO_nav_Walker extends Walker { var $db_fields = array( 'parent' => 'menu_item_parent', 'id' => 'db_id' ); function start_lvl(&$output, $depth = 0, $args = array()) { $indent = str_repeat("\t", $depth); $output.= "\n$indent<ul>\n";
What is “beforeSend”
Hi, I have notices that jQuery File Upload plugin takes some undocumented parameters like “beforeSend” method – is this documented anywhere? Regards, Janusz
Got stuck with this mouse tilt effect
Hey everyone, I'm very new to jquery and I tried to code a tilt effect on a card with the help of some plugins and snippets. So, you see the actual status of my work in the iframe above. The cards are moving if the mouse is moved. My problem is that every card is moving. My aim is that only the card which is hovered with the mouse should move and the rest should do nothing. Can someone help me with my problem? Thanks, Chris
malsup jQuery Form: How to enable submit button after form is bound
Guys, I have a form with image preview using malsup Jquery Form But when I submit the form, the submit button has got no action. I know it's been defaultPrevent-ed by the Plugin to run an AJAX call. I don't know how to enable the button. how do I do it? pastebin: https://pastebin.com/NVa3N039 <form id="multiple_upload_lampiran"
method="post"
name="multiple_upload_lampiran"
action="lampiran_upload.php" enctype="multipart/form-data">
<input type="hidden"
Why it doesn't return the value?
So basiclly I have a very simple function to get online players but it doesn't return to the value what I'm looking for. $(document).ready(function() { var ip = "mc.hypixel.net"; loadPlayerCount(ip); window.setInterval(function() { loadPlayerCount(ip); }, 60000); }); function loadPlayerCount(i) { $.get('https://eu.mc-api.net/v3/server/info/' + i, function(s) { if(s['status'] == false) { return -1; } else { return s['players']['online'];
How can i sort a list of elements/items based on specific text or numbers using jquery ?
Hello community. I 'm building a search function which is filtering the listed items by their names everytime a user is start typing into an input field and at the same time it counts the number of displayed items/results. I want to improve it more so i added 2 checkboxes that will allow users to sort the results by (eg best rated, or specific tags). In my current example there are 2 checkboxes (OPEN FIRST, BEST RATED) How can i make them so if someone click on them to sort the listed items ? MY
Issue on Binding jQuery UI Slider with Checkbox Event
Demo I am able to check and uncheck some checkboxes on jQuey ui slider stop() using following code. But this looks like is not adding any event to the check boxes!. As you can see the check boxes are re-acting against direct check in out by logging on console but doing nothing when slider change. Can you please let me know why this is happening and how I can fix this? $(function() { $("#slider-range").slider({ range: true, min: 50, max: 54, values: [50, 54], stop: function(event,
The price value dont appears with "$"
I have this code so when the user introduces for example "10" it appears 10,00 in the price field: document.getElementById("show_price").onblur = function () { var $price = document.getElementById("registration_type_price"); $price.value = this.value; this.value = parseFloat(this.value.replace(/,|\$/g, "")) .toFixed(2) .toString() .replace(/\B(?=(\d{3})+(?!\d))/g, "."); } But I would like to show also the $, like 10,00$. Do you know how to achieve
Why does the Close button indent to the right?
/* The 'Add Apps' button is aligned to the Left. But for each toggle, the Close button indents the right. When it toggles back to the Add Apps, that is correctly aligns to the Left. */ $(".application_add").toggle(); $("#application_toggle").click(function() { $(".application_add").toggle(); if ($("#application_toggle").attr("value") == "Add Apps") { $("#application_toggle").prop('value', 'Close'); $(".application_add").find("input").prop('required',
how to find document.ready function in globalnamespace
hi, Any variable we create in the script(javascript) tag of HTML, it goes to the global namespace. which can be seen in the console tab of the developer window(f12). I wanted to find out where does document. ready function goes, and whether it goes to the global namespace or not. your sincerely
How to add a custom button in the insert menu?
Im using tinymce in a textarea and the content the tinymce code is like: tinymce.init({ selector: 'textarea', plugins: 'image code link lists textcolor wordcount ' + ' hr pagebreak colorpicker textpattern anchor table media', relative_urls: true, file_browser_callback: function (field_name, url, type, win) { // trigger file upload form if (type == 'image') $('#formUpload input').click(); } }); And its working. But I would like to include in the "Insert"
How do I get jquery validation to apply the "success" function to only elements that have a certain class present?
Hello, I am using the jquery validation plugin. It works well...perhaps too well. It is applying validation to every input on the page because <span class="glyphicon glyphicon-ok form_control_feedback"></span> is inserted after every input field. I would like it to be more selective. Perhaps only inserting the above class if another class is already present in the input. Can anyone help me out with this? Thanks
Better mechanics for this code?
Hello, I have the following code and even though it does what i want to do i think that i write too many lines of code for this function. In short, i have some modals in which i load forms dynamically with .html(). I want to add / remove in each modal opened the "modal-lg, modal-md" class etc.. in a better way. In my fiddle i use some if statements. Is there any other way to achieve this by using less lines of code? I've tried addClass, removeClass, toggleClass etc.. but it doesn't seem to work
ajax Why my code is all correct but its still not working?
$(document).ready(function(){ $('.trolley').click(function(){ $(this).find('i').toggleClass('open'); // call the icon class in h3 class and add .open $('.addbar').toggleClass('open'); }); $('.a1').click(function(){ var qunti = $('#itemnum1').val(); var id = $('#hidden1').val(); $.ajax({ url:"Promotionaddajax.php", method:"post", async: false, data:{ "cart": quanti, "item": id }, success:function(data) { $('#itemnum1').val(''); } });
Hold a keypress (Shift Key) in Javascript/Jquery
Here we are not checking that the shiftkey is pressed or not. What i need is to press shiftkey on a function call We have code where a key can be pressed on element keypress. e = jQuery.Event("keypress"); e.which = 13 //choose the one you want $("#test").keypress(function(){ alert('keypress triggered'); }).trigger(e); My requirement is Shift Key should be kept pressed on my function and released on another function called. function called(){ .. code .. // need shift key pressed } function called_another_func(){
Loading jQuery UI Slider All Selected Range (Not Only Min & Max) To an Array
Can you please take a look at this Demo and let me know how I can load the selected range values between Min and Max into an array? the selected.push(ui.values); is giving me the Min and Max of selected which is Ok but I also need the values between too $( function() { var selected =[]; $( "#slider-range" ).slider({ range: true, min: 133, max: 146, values: [ 133, 146 ], stop: function( event, ui ) { $( "#amount" ).val( "$" + ui.values[ 0 ] + " - $" + ui.values[
How to get main image from wikipedia using jquery or php
I have an HTML page where I put city image. I want to load the main image of city from Wikipedia using jquery or php. I tried using jquery with ajax but it loads all images i just want to load main image $.ajax({ url: "https://en.wikipedia.org/w/api.php", data: { format: "json", action: "parse", page: "Mumbai", prop:"text", section:0, }, dataType: 'jsonp', success: function (data) { console.log(data) var markup = data.parse.text["*"]; var i = $('<div></div>').html(markup); $('#article').html($(i).find('img'));
Get values from multipy inputs for search field
Hi. Kindly asking for help. I have this code https://jsfiddle.net/advokatb/caj5ds2u/4/ There is one search field, several checkboxes and several inputs (they are for numbers). As result I need to make search query something like this: OperaName alto:1 bass:2 So the 1. "OperaName" i should type myself in search field. 2. alto (name of checkbox) should be pushed to search field with the number that I type in input with class qty. If qty field is set, than alto:1 should be appended to the main keyword
JQuery - JSON API Connection
Hi, I am using the following code trying to POST / add some property data through to an API using this code https://api.beds24.com/json/createProperties - I'm new to JSON and API's but have a fair understanding of programming, I am getting no errors and the console response looks ok (but I have very limited JSON API knowledge), will add the response to another post as too long for this post. Please could someone have a look and point me in the right direction to getting this working. Thanks for looking.
Add total number of Rows
I am dynamically appending data to a tr and want to add number of rows to the bottom of the table. Below is my code. Any ideas will be appreciated. $('#admin').change(function() { var select = $("#admin option:selected").val(); $.ajax({ cache: false, async: false, type: "GET", url: "@(Url.Action("Employees", "Details"))", dataType: 'json', data: { "id": select }, success: function(data) { $("#admin").val(select); var target = $("#LoadEmployees"); target.empty(); for (var i = 0; i < data.length;
jquery sumo multiselect
hi i want to add ok cancel in bilow of single column only but its width sown full control width. http://jsfiddle.net/RahulKanheya/p89ka9jq/814/
jquery multiselect
i am using jquery multiselect in that i want to show multiple cloumn in dropdown. but i did 't find any option to show dropdown value in multiple column using blow pluging example. http://jsfiddle.net/RahulKanheya/p89ka9jq/767/
click function on Bottstrap toggle button
Hi, I´m generating two toggle buttons in my site: function addDataLayerToggleItems(layerName, layer) { $("#LayerControl-List-DataLayer-Items").append( $("<div>", { class: "checkbox" }).append( $('<input>', { type: "checkbox", id: layerName, 'data-toggle': "toggle", 'data-on': "Ein", 'data-off': "Aus", 'data-on': "Ein", 'data-off': "Aus", 'data-onstyle': "success", 'data-offstyle': "danger", class: "toggle" }) ).append( $('<label>').text(layerName) ) ) } how do I generate a click event to do something
JQUERY DYNAMIC TABLE DELETE PROBLEM
I am dynamically creating a table to add employees. After adding more than one row, i have deleted the first row. Again adding the same not working..any help will be appreciated. my code is as follows function() { $(document).on("click","#btnAdd",function(){ var empid_name = $("#selEng").val(); empid_name = empid_name.split("_"); var empid = empid_name[0]; var empname = empid_name[1]; var hour = $("#txtIHour").val(); if(empid_name=='none') { alert('Please select an Engineer'); return false; }
Next Page