Resume after preventdefault()
I am using event.preventdefault() to prevent various default events occurring. I Displaying a modal / lightbox window instead. The window has some buttons one of which will allow the event to continue. Is there any way to store the prevented event and run it later? If it helps although the elements which have prevented events are very dynamic i can be certain that the only event which may need to be continued is the last one which was prevented perhaps the event.isDefaultPrevented() can help
BlockUI + jQuery 3
Hi, I'm getting this error when trying to use blockui plugin: TypeError: lyr2._fadeIn is not a function [Learn More] jquery.blockUI.min.js:1:7615 This is the code I'm playing with: <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
jquery autocomplete - adding link to json data
Hi, I am using the following code for jquery autocomplete. Can anyone help me to add links to json data? <script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-3-typeahead/4.0.2/bootstrap3-typeahead.min.js"></script> <script> $(document).ready(function(){ $('#country').typeahead({ focus: function(event, ui) { // prevent autocomplete from updating the textbox event.preventDefault(); },
Getting items into cart with info from data-attributes
Hello I'm doing an online shop for the first time so i'm still getting into grasps with this. The first task, which is retrieving the items info and putting them in the cart doesn't work, therefore i cannot check if the other tasks are also working (like price calculation, increase/decrease price and remove cart display when item is there or is not) The articles info is inside a custom data-attribute so i'm trying to retrieve it. I've made a fiddle that you can check below: Shopping Cart Here is
Loading files into folder and read <li> tag content
Hello experts, I'd like to know How I can import list from other files: Files_to_list ├── list_files.html ├── list_1.html ├── list_2.html ├── list_3.html _______________________________ Structure of list_1.html _______________________________ <ul class="list-content"> <li class="article-item"> <div class="text-container"> <div class="article-status"><span class="article-status-label">Publicado</span></div> <div class="article-title">Você costuma sonhar com fantasmas? Você
generating a js object from a string
Hi , I am confused to embed a html string to an element. I used $("#element_id").html(str) But it failed. I also tried to use JSON.parse(str). html object was not formed. How can I generate a js object from following string ? here is the string that returns from my server --- <script type="text/javascript"> (function() { var fn = function() { Bokeh.safely(function() { (function(root) { function embed_document(root) { var docs_json = '{"1744c54a-051b-44c5-b6cf-7b3c3e636e68":{"roots":{"references":[{"attributes":{"bottom_units":"screen","fill_alpha":{"value":0.5},"fill_color":{"value":"lightgrey"},"left_units":"screen","level":"overlay","line_alpha":{"value":1.0},"line_color":{"value":"black"},"line_dash":[4,4],"line_width":{"value":2},"plot":null,"render_mode":"css","right_units":"screen","top_units":"screen"},"id":"e4dd2fda-0b1c-4dd7-b2b9-a37cddce5e71","type":"BoxAnnotation"},{"attributes":{},"id":"8c68f477-291a-482f-a12c-2d62a32d877a","type":"LinearScale"},{"attributes":{"dimension":1,"plot":{"id":"9895c2d7-0571-41c4-ab9d-9924dfe4956a","subtype":"Figure","type":"Plot"},"ticker":{"id":"2d08fb0f-6e17-4b42-9a75-0f2e926ba5b2","type":"BasicTicker"}},"id":"1642bad1-c842-4f20-ad33-40121b0afe9d","type":"Grid"},{"attributes":{"fill_alpha":{"value":0.5},"fill_color":{"field":"yas","transform":"#fb9a99"},"line_color":{"value":"white"},"line_width":{"value":0.5},"xs":{"field":"x"},"ys":{"field":"y"}},"id":"81260da3-6aa6-4f17-aa1a-66d597562647","type":"Patches"},{"attributes":{"formatter":{"id":"56b5109f-3e90-4ae2-afc4-084c1360a9da","type":"BasicTickFormatter"},"plot":{"id":"9895c2d7-0571-41c4-ab9d-9924dfe4956a","subtype":"Figure","type":"Plot"},"ticker":{"id":"c5b3bc3e-1b48-48ca-a776-12b6db20d0e7","type":"BasicTicker"}},"id":"b2109c49-32b2-4047-8147-245c98306311","type":"LinearAxis"},{"attributes":{},"id":"fde2a259-96ce-41db-b50b-4a33ae55e869","type":"LinearScale"},{"attributes":{"active_drag":"auto","active_inspect":"auto","active_scroll":"auto","active_tap":"auto","tools":[{"id":"eaaa30a2-10dc-412b-9182-1a5b82951a25","type":"PanTool"},{"id":"17f6636f-dc45-4edb-b0f4-03501c5d64c0","type":"WheelZoomTool"},{"id":"75b5f942-5c7b-4999-88f0-324adc2ace71","type":"BoxZoomTool"},{"id":"e16efbc8-46c4-4b31-a382-f90701f70b4c","type":"SaveTool"},{"id":"d6c60783-ea44-4c3e-9399-9c98aee89b40","type":"ResetTool"},{"id":"47a157ac-9305-418c-a99e-b47edcbec139","type":"HelpTool"}]},"id":"0bdea79b-5cea-4102-85c6-948468c1868d","type":"Toolbar"},{"attributes":{},"id":"c5b3bc3e-1b48-48ca-a776-12b6db20d0e7","type":"BasicTicker"},{"attributes":{"plot":null,"text":"Jeo
Keypad should automatic open in input text box for tablet/ipad in google chrome browser .
Hi, I am building a website only for iPad/ tablet. in the landing page, we are asking from users to enter a mobile number. but the client wants iPad/tab keypad should be automatic open whenever page will load. can anyone help how it will be open .?? my code is. <input type="number" min="1" max="9999999999" class="form-control" name="mobile_number" id="mobile_number" placeholder="Mobile Number" autofocus> I am testing it in google chrome. Thanks
Unable to get the control value from html table row on button click
Dear All, I had written the below code to get the text input control value from html table row, I am able to get the values of other columns except input control .Can any one tell me what's wrong in it. <!DOCTYPE html> <html> <head> <style> table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border: 1px solid #dddddd; text-align: left; padding: 8px; } tr:nth-child(even) { background-color: #dddddd; } </style> </head> <body> <h2>HTML
taken fees not greter than original fees issue
<script type="text/javascript"> $.validator.addMethod('ge', function(value, element, param) { return this.optional(element) || value <= $(param).val(); }, 'Invalid value'); $("#fees_validate").validate( { errorElement: "span", rules: { taken_fees: { required: true, ge: '#fees' } }, messages: { taken_fees: { required: "Required", ge: 'You
Unable to Validate multiple Inputs
I have a simple 5 input boxes where user can select 5 different cities from Autocomplete. I want to Validate if any user is entering same city name more than once or not. And highlight that box with a color. I tried with two input boxes it works fine. For more than two it does not work. https://jsfiddle.net/nkdap5fa/12/ html <html> <input type="text" name="country1" id="country1"/> <input type="text" name="country2" id="country2"/> <input type="text" name="country3" id="country3"/> <input type="text"
How to send post request of content editable elements using ajax
In my project parsing JSON data from controller to ui page.And then modify the required the changes in the UI page .USing Contenteditable attribute i can make the elements to edit.Once the modifications has been done, changes has to be made in MYSQL database.I am trying to send the editable elements using AJAX post request.But request is not happening.Can anybody suggest me how to send request AJAX request am trying to send <script> $(document).ready(function(argument) { $('#save').click(function(){
Using jQuery-ui autocomplete with MySQL to fill two input fields
I have a need to fill two input fields using autocomplete. I'd like to pull from of my MySQL table Fname and Lname both in a different column of the table. It seemed to me if I were to concatenate the two fields using CONCAT(Fname, ', ', Lname) as FullName then pass this value back to source of jQuery. But I don't know what to do from there to split the 'term' value as it returns. Here is what I have. But the return puts both names 'Bill, Smith' for example in both the #Fname and #Lname. I just
How to appaend table heading and parsed json data into one row in html table
i am having this code $.each(data1.Grade, function (i, item) { gradetr +="<td>" + item.Grade[i] + "</td>"; }); $('#grade').append(gradetr); HTML CODE: <table border="1px" id="grade" style="width: 700px;"> <tr> <th style="text-align: left;">Grade</th> </tr> <tr> <th style="text-align:
i can't understand the working flow of the following code, can anyone explain me?
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("#myInput").on("keyup", function() { var value = $(this).val().toLowerCase(); $("#myTable tr").filter(function() { $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1) }); }); }); </script> <style> table { font-family: arial, sans-serif; border-collapse: collapse; width: 100%; } td, th { border:
Button click function not working for more then one time
Dear All, I had written the below code to create the element and append to html table ,And it's working for fine for only one time. Can any one please help me for what reason it's working only for 1 time <button onclick="myFunction()">Try it</button> <table id="tblCustomListData" border="1" width="100%" style="overflow-x:auto;"> <thead> <tr class="bgcolorgray"> <th>Sno</th> <th >Current DR</th>
JavaScript to expand submenu in a jquery website with Jquery ui plugin installed
Dear all, I am currently developing a automation testing program in IE to a jquery website with menu widget plugin installed. However using Selenium click function is not able reproduce the hovering of menu item to display the sub menu items. Hence I am thinking of directly call the JavaScript in the webpage to trigger the sub menu display. Can you guys advise how the JavaScript shall be written to trigger a display of sub menu items? (I.e. simulate hovering the menu item for display) Many thanks,
create the input control dynamically and assign the value through variable
Dear All, In my below code , I am able to create the element , But I am willing to assign the value via variable "tempvalue" , Can any one help me in knowing how can I do this <!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <script type="text/javascript" src="https://code.jquery.com/jquery-1.10.2.js"></script> <script type="text/javascript"> var tempvalue="Something"; function myFunction() { var txtHTML = ""; //Create Textbox var textInputBox
Why the below code runs to 'undefined'?
<script> var memberTable; $(document).ready(function(){ memberTable = $('#memberTable').DataTable(); }); function addMemberModal(){ $("#createForm")[0].reset(); $("#createForm").unbind('submit').bind('submit',function(){ var form = $(this); $.ajax({ url : form.attr('action'), type : form.attr('method'), data : form.serializeArray(), //converting form data into array and sending it to the server dataType : 'json', success:function(response){ console.log(response); if(response.success===true){ $(".messages").html('<div
how to get the ids of element being moved and element being replaced with sortable?
i want to get the CORRECT ids of both elements, one which is being moved and one which is being replaced, following is my code but please DO NOT CONFUSE ,you will see its working but its not , just move the table rows up and down few times and see the console , you will see its not getting correct ids, so something is wrong , please help <table border="1"> <thead> <tr><td>position</td><td>description</td></tr> </thead> <tbody id="sortable" class="ui-sortable"> <tr class="ui-state-default"
Canvas css filter lost when I use Jcrop
hi guys I am using JCROP to crop images and applying a css filter to it. However when the canvas (image) is cropped, it loses its css, (ie the User chosen filter is lost) However if I call the same function via button click it works, but not with jcrop Here is my code Ehi function CanvasCropCSS() { // THIS IS CSS FILTER FUNCTION $("#canvas").removeClass(); var t = $("#Hidden_Filter").val(); //It gets the value of the applied filter from a hidden field alert(t);
How to display certain select field options based on previous select box selection
I have a form that has four select boxes. How can I set it up so that the selection from box #1 affects what displays in box #2? Then the selection in box #2 affects what options display in box #3 and so forth? Example: Select box #1 options: - Green - Red - Yellow Select box #2 options: - Grapes (only shows up if "Green" is selected) - Watermelon (only shows up if "Green" is selected) - Apples (only shows up if "Red" is selected) - Cherries (only shows up if "Red" is selected) - Bananas (only shows
Creating my own select navigation plugin
Hello, I've stopped developing websites many years ago but want to pick up my old hobby again. Please take a look at the following code: <button><</button> <select name="fontsize"> <option value="8px">8px</option> <option value="10px">10px</option> <option value="12px">12px</option> <option value="14px">14px</option> <option value="16px">16px</option> <option value="20px">20px</option> <option value="24px">24px</option> </select> <button>></button> I want to create a plugin that changes the select-option
How delete everything between two special patterns?
Assume a web pages contains a lot of stuff (mosty text). In between the text occasionally something like foobar text [caption ...]......[/caption] sample text behind appears. How can I delete with jquery all occurrencies of [caption ...].....[/caption] including the [caption] and [/caption] patterns? "Foobar text" and "sample text behind" (in the sample above) should NOT be deleted Between [caption ...] and [/caption] other elements could appears which should be deleted as well.
Problème d'inclusion des fichiers jquery mobile
Salut les amis. j'ai découvert le framework jquery mobile qui m'a beaucoup intéressé. J'ai début il y a de cela trois jours mais lorsque j'exécute mon code après plusieurs tentatives, je ne vois aucun effet de ce framework sur mon code. Je me suis faire aidé par des tutoriels mais le problème persiste toujours. Je ne sais pas cela du à quoi . pour plus de précision j'utilise la version 1.4.5 de jquery mobile et 3.2.1 de jquery. Voici quelques captures. J'ai énormément besoin de votre aide. Merci
Get the value of the chosen data-class and write to a label ?
hi guys I have a group of 10 images which have the following data class below How do i get the value of the selected data-class and write it to a label ? thanks Ehi $(".classify").click(function () { $('#filter').text('You have chosen a filter'+data("class").val); // #filter is the name of the label to be written // below is my image src <img id="Image1" class=classify data-class="blur" style="width:50px; height:50px;" title="Original" alt="thumb image">
Hello my friends! I continue to study jQuery. I returned to my former example, and I can't understand why I can't display the second photo. #filter_image2. I'm add to DB employee_photo2
$(document).ready(function() { $("#sel1").change(function() { var id = this.options[this.selectedIndex].value; var data = { empid: id }; $("#filter_image").removeAttr("src"); $("#filter_image2").removeAttr("src"); $.ajax({ url: 'getEmployee.php', dataType: "json", data: dataString, cache: false, success: function(employeeData) { if(employeeData) { $("#heading").show(); $("#no_records").hide(); $("#emp_name").text(employeeData.employee_name); $("#emp_age").text(employeeData.employee_age);
popup alert once a day
Hi, I am trying to popup an alert once a day, but it does not work, long time I did not touch jquery, I feel I am lost, thanks, your help is appreciated. Here is what I did : <html> <head> <link rel="stylesheet" href="reveal.css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.min.js"></script> <script type="text/javascript" src="jquery.reveal.js"></script> <script type="text/javascript"> $(document).ready(function() { if ( localStorage.getItem('seen')
Best practices on setting values on 10 images
hi guys, I have a main image and 10 thumbnails with hover over effects that are set dynamically. I have only pasted top 5, I also have a 3rd option for hover on effects and wondering if I am on the right path Is the script below ok ? If not, whats best practice ? thanks Ehi $('#Image1').click(function () { $("#canvas").addClass('sepia'); }); $('#Image2').click(function () { $("#canvas").addClass('saturate'); }); $('#Image3').click(function
I am using jquery muliselect dropdown list but i am getting lines inside the drop drown list , i am getting this issue in IE only.
Bootstrap:- <tr> <td> <div class="input-group col-xs-4" style="padding: 0 0px 5px 0px; float: left; margin-top: 5px"> <div class="input-group-addon" style="padding-right:20px">Base</div> <div class="input-group-value" style="width: 152px; padding-top: 5px; height: 25px; vertical-align: middle; margin-right: 0px;"> <dl class="dropdown" style='background-color:white'> <dt> <a
ready(function()
Please, how do? to read the variable? <!DOCTYPE html> <!-- # test powershell cls # mercredi 28 février 2018 10:53:04 $xtime = ([System.Io.fileinfo]'c:\........html').LastWriteTime $xSec = (new-timespan -start "00:00:00" -end $xtime.AddHours(1)).TotalSeconds " " + [int]$xSec + " Sec." # 37910 sec --> <html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"> <title>min-left-2</title> <style> p{color:red;} </style> <script type="text/javascript" src="jquery-1.7.2.js"></script>
How can i work with API ?
Hi friends, I'm trying to fetch API using POST method with key ans value. If anyone know please help. thank you
What am i doing wrong? Help
hi everyone what am i doing wrong with my menu? it dont wanna work This is what it looks like after i add the menu this is the code for that part as its a mvc kind off script
How do you debug a jquery ajax app crash in a mobile app?
I'm doing a pretty simple ajax transaction (submitting data) and I'm getting a complete and total app crash (everything is unresponsive, all storage is wiped out, debug console (in simulator and live) is erased etc. <script src="jquery.mobile/jquery-2.1.4.min.js"></script> <script src="jquery.mobile/jquery.mobile-1.4.5.min.js"></script> <script src="jquery.mobile/jquery.validate.min.js"></script> <script src="jquery.mobile/additional-methods.min.js"></script> I have a really basic signup form which
Filter table with Datepicker
Hi everyone, I have a Datepicker and 2 drops down menus on my page. After the user selects the date i need a filter to check the date of the data values of the dropdowns and show or hide and bold the dates after the date selected. $('#Start').on('selectedFromDay', function(){ var value= this.value; var dateText = datepicker(); $('#results-tbody tr').each(function () { var element = $(this); element.data('filters', element.data('filters').replace(/changes/g, '')); if (value !== 'All' && dateText >=
404 Not found when searching Jquery Mobile Forums
Just an FYI here, I typed a query into the "Search jQuery" box (because some of us actually do search before posting), clicked the magnifying glass and got a 404 error. https://forum.jquery.com/jquery-mobile/search/ajax%20crash
Javascript for Accordion - Open one at a time
Hi, If someone could help me create javascript for an accordion I have created that would be awesome. I'm wanting it to do the following: Only open one accordion item at a time I'd like the page to load and have all the accordions be closed by default as well even if they were saved in their open state by accident. I would like it to slide quite smoothly as well from one accordion to another. I have created the accordion for SharePoint publishing pages. my HTML is: <div class="panel1" id="accordion">
Output object properties in 2 columns
I'm struggling to output the object array in 2 columns. I need to output match2 in 2 seperate solumns. Thank you. https://jsfiddle.net/eqf3tcx2/16/ JS: $(function() { createQuizLayout(); initQuiz(); $('#reset').on('click', function() { $('#source li').draggable('destroy'); $('#target li').droppable('destroy'); createQuizLayout(); initQuiz(); }); }); function createQuizLayout() { var match1 = ["One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten"];
I just installed jqery-ui from npm and there is no jquery-ui.min.js file in any of the directories
I have installed it two now and the file is just not there. is there an alternative? did the file name get changed since the instruction were written here: http://learn.jquery.com/jquery-ui/environments/bower/ I did not use bower but i assumed trhat the only difference would be the directory name. In bower the path would be: <script src="bower_components/jquery/dist/jquery.min.js"></script> in npm the path would similar but like: <script src="node_modules/jquery/dist/jquery.min.js"></script> So
check value of multiple check boxes
I am using the following code to check the value of multiple check boxes if ($('#ForenameUnknown').is(':checked') || $('#SurnameUnknown').is(':checked')) { // my code } this runs my code if at least one of them is true i want to replace this code with something that checks the value of all checkboxes on the form in a single statement something like this if ($('form > input[type=checkbox]').is(':checked')){ //my code } (I would want this to run run my code if at least one is checked or
two word search give 404 on
https://forum.jquery.com/jquery-mobile/search/ajax%20crash fails, while https://forum.jquery.com/jquery-mobile/search/ajax works. And they have errors. Please look into this. JΛ̊KE
Next Page