toggleClass() not working from text editor, works in web inspector
hey! I'm having a strange problem, I tried to use toggleclass(), when I put it in the editor doesn't work (the rest of the js runs correctly, so I know the file is well linked) but when I try in web inspector it works perfectly any ideas? var main=function(){ $('#lucas').click(function(){ $('#lucas').toggleClass("perfil2"); }); }; $(document).ready(main);
Stop floating scrollbar when reaching to footer
I need to stop floating scrollbar when reaching to footer. I tried the follwing code but no luck. var $sidebar = jQuery(".cartitemsguy"), $window = jQuery(window), offset = $sidebar.offset(), topPadding = 15; var footerwraptop = jQuery('.footer').offset.top; $window.scroll(function() { if ($window.scrollTop() > offset.top) { $sidebar.stop().animate({ marginTop: $window.scrollTop() - offset.top + topPadding }); if (jQuery('.cartitemsguy').offset().top + jQuery(".cartitemsguy").height() > jQuery(".footer").offset().top)
Get stored input data form window.localstorage when browser is closed suddenly ,Few scenario i cant able to get data
Test1 = <input type='text' title='Tags' id='tags' name='test1' /> <br/> Test2 = <input type="text" id="idfield1" name="test2"> <br/> Test3 = <input type="text" id="idfield2" name="test3"> <br/> Test4 = <textarea id="tr" name="test4"></textarea> script : $(document).ready(function() { var aTags = ["ask", "always", "all", "alright", "one", "foo", "blackberry", "tweet", "force9", "westerners", "sport"]; $("#tags").autocomplete({ source: aTags }); }); $('#idfield1').keypress(function() { $('#idfield2').val($(this).val());
Datepicker request
i am hoping to open this title to correct place. Is it possible to have functionality like functionality this calendar has. https://forum.jquery.com/topic/clickable-title when you click april you see all months in a box. And when you click year you will see years in a box. Same principle is valid in windows calendar too. Thanks.
copy given elements to another div
let's take this image: <li class="mix shoulders check1 radio1 option1"><img src="images/exercises/shoulders/Single-Arm Linear Jammer.jpg" alt="Image 1"></li> I am getting it by this function: $(function(){ /* elements is a name that preceding the selectors. get all img tags found inside li tags and fire the function. Then bind to the elem-msg div (which is inside the info_box) the elemText value. */ $('.elements li img').click(function(){ $('.body-inactive').show(); $('.info_box').fadeIn(2000);
Disable Friday and Saturday from Jquery DatePicker
Dear All, I have 2 date-pickers using html controls in my .JS file and I would like to disable all Friday's and Saturday's from date-picker. And also I would like to fetch the month name from the selected date-picker Can any one please help me in providing the solution Thanks SID
How can I access a value returned via AJAX in jQuery?
I need to select values from some html select elements based on what is passed back from an AJAX call. The data is being retrieved, but I can't seem to access the data so as to use it to set the html select elements to the appropriate value. This is the html that describes the html selects that need to be manipulated: <div class="row"> <div class="col-md-6"> <div class="containerforproact"> <div> <select id="dayofmonthselect">
1.12.0-rc.2 - controlgroup inside dialog boxes
Hi - I'm new here so please forgive me if I've missed something. I'm upgrading our app to cope with the breaking changes in the forthcoming release of jQUI 1.12.0. Currently testing under rc2. I've noticed a possible problem with checkbox controlgroups inside dialog boxes - it seems that the 'checks' are misaligned. You can see a fiddle for it here: https://jsfiddle.net/mvqhonqv/ If you remove the .dialog section from the bottom of the JS and run again, the ticks show properly. It seems to be just
Dialog not visible when div is full screen (requestFullscreen)
Hi, I'm building a website where a part can be shown full screen. Unfortunately when the div is shown in full screen mode, the dialog is hidden behind the full screen div. Only after pressing escape to undo full screen, the dialog is visible. See code below. Button 'Show full screen' makes the div full screen. Button 'Show dialog' supposes to show the dialog, but does this only when the div is not full screen. What am I'm doing wrong? Thanks! [code] <!DOCTYPE html> <html> <head> <meta charset="UTF-8"
Uncaught SyntaxError: Unexpected end of input
Hi, I have just added a datepicker to my order page but started getting this error: Uncaught SyntaxError: Unexpected end of input and when clicking on the datepicker I get this error: jquery.ui.datepicker.js:1970 Uncaught TypeError: Cannot read property 'inline' of undefined Not sure what could be the reason.. here is the link: https://www.cakeboutiquebh.com/before_submission.php Kindly help... Thanks, Jassim
Get Jquery Date-picker value in Java-script Function
Dear All, I am having a form which consists of html controls(Text-box,dropdown..etc) along with query date-picker control ,As the jquery date-picker control is compatible for all the browsers And I had written the java-script in a function which gets all the values of controls existing in the form ,But I found no luck to get the date-picker value . Can any one please help me in getting the value of data-picker in function <!doctype html> <html lang="en"> <head> <meta charset="utf-8">
Get Jquery Datepicker value on button click
Dear All, I am at beginning stage of the jquery. And trying to get the value of selected date from datepicker on clicking the button.Below is the writing code ,But found no luck .Can any one help me please <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>click demo</title> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css"> <script src="//code.jquery.com/jquery-1.10.2.js"></script>
Modify table text
Her is my html I want to refer to the italic text (target-text) and change it(and only that) to something else like "new-text". Is it possible with jQuery? Thx I. Lesher <tr class="odd"> <td>monthly recurring</td> <td> <strong>ILS 50.00</strong> target-text<strong>ILS 50.00 לפי חודש עבור 12 חודשים נוסף</strong>. </td> <td> <a class="pmpro_btn pmpro_btn-select" href="http://triplebit.com/kityopo/membership-account/membership-checkout/?level=5">בחר</a> </td> </tr>
Add text box for each element (image) given
I have multiple <li> items in my code: I want to add to each image (wrapped in <li> tag) a text box that will pop out for each image when I click/tap on it. that partial code is an e.g.: <li class="mix biceps check1 radio1 option1"><img src="images/exercises/biceps/Alternate Hammer Curl.jpg" alt="Image 1"></li> <li class="mix biceps check2 radio2 option2"><img src="images/exercises/biceps/Barbell Curl.jpg" alt="Image 2"></li>This is currently the code for contenteditable div: <div id="test" class="test"
How to send a form without refreshing the page
I make a form in Wordpress Template that makes certain calculation and displays the result in a modal Bootstrap. HTML: //FORM <form method="post" id="myForm"> <span>Name</span><br><input type="text" name="name" id="name" required> <span>Email</span><br> <input type="email" name="email" id="email" required> <span>Altura</span><br> <input type="number" name="altura" id="altura" required> <span>Peso</span><br> <input type="number" name="peso" id="peso"
jQuery UI Selectmenu / collapsing select-box / options width not taken into account anymore?
Hi All, did anyone also noticed, a selectmenu is collapsing since one of the last jquery-ui versions? Having a select-tag without any width and an option-tag which has a quite long text, now I get rendered a select-box with ellipsis appended to the selected option. In previous versions (and unfortunately currently I'm not able to define the version / not reproducable), the width of the select box was rendered depending on the longest option-entry. So, when opening the menu, its width also matched
jQuery only loads after refresh
Hi, I am using WordPress on my site and I have created a custom jquery in order to add the qty input fields again: jQuery(document).ready(function($){ $('.quantity').on('click', '.plus', function(e) { $input = $(this).prev('input.qty'); var val = parseInt($input.val()); $input.val( val+1 ).change(); }); $('.quantity').on('click', '.minus', function(e) { $input = $(this).next('input.qty'); var val = parseInt($input.val()); if (val
Slider is not working in Windows Mobile
i, I am using a slider in my application. It is working in iPhone, Android as expected. But, in windows Phone (Tested in Mobile and debugging in Nokia Lumia 520 Emulator in Chrome) not working as expected. The reason I found is 'change' event is not firing in Windows Mobile. I am using the below versions: jquery.mobile.slider.js (jQuery Mobile 1.4.2) jquery.mobile.slider.patch.js jquery-2.1.1.js (jQuery 2.1.1) Any help would be appreciated. Thanks in Advance Kiran
How To Move An Element (with arrow keys) Consistently???
I have a DIV set up to move whenever I press an Arrow Key. It moves fine with one push, by holding the arrows is a little messed up. When I hold an Arrow Keys, the DIV moves in one increment THEN it continues to move, as I hold the Arrow Key. How do I get rid of the first increment? I want the DIV to move consistently when I hold an Arrow Key. Here is my JavaScript code: $(document).keydown(function(e){ switch (e.which){ case 37: //left arrow key $(".ball").finish().animate({
How to use JQuery autocomplete selected item?
I assign selected autocomplete value to variable var selected and posting it to the same php page, after the page is reloaded, am checking if the variable is posted like this: if(isset($_POST["selected"])) then echo it, but nothing happens. I need to use this variable in query, after page is reloaded.The question is how to use correctly selected autocomplete item? <script> $(function() { var data=<?php echo json_encode($namesArray);?>; var selected; $( "#searchTags" ).catcomplete({ delay: 0, source:data,
How to include html generated by one function in another ?
Hello, I desesperatly try to include the html generated by the function AjouterRepasMesures(DateCourte, MomPrise, htmlAffMesures) within the html generated by the function AfficheMesures() in the places between //************************** could someone put me on the path? Thanks in advance Here is the code: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
Progress bar with Target and actual values
Hi all, I have a requirement where i need to show target vs actual values in a progress bar. Something like in the attached image. Could you help me any responsive js library or suggest some code using which I can do this? When actual is less than target it is easy but when actual is greater than target it may not be responsive.
error getting correct position of form elements from non active tab
Hello, I have 2 tabs and each has few form elements in it (text box, radio etc.) I am validating some of the elements before form submit and showing error tooltip next to input element. This works perfect for active tab however for inactive tab, it does not return any position value. below is the code tab id is parameter "divbodyid" $('#'+divbodyid+' .required').each(function(){ //inputlength = $(this).val().length; inputlength = $(this).val(); if (inputlength == null) { inputlength
Problem get data from select, input-hidden value in Firefox
My code is: <div class="blockTxt"> <input type="hidden" name="item_type" value="<?php echo $r->cat;?>"> <div class="foodName"> <h4 class="item_name"><?php echo $r->name;?></h4> </div> <div class="btnFood"> <select class="quantity-select"> <option selected="selected" value="8">8 </option> <option value="16">16 </option> <option value="24">24 </option> </select> </div> <?php echo $r->cont; ?> </div> <button class="btn" data-id="<?php echo $r->id;?>">
JQuery Code executed BUT appears as text on the webpage as well
Hi, I just started out with JQuery and ran into some difficulties which I could not solve by myself. I used the bootbox plugin to create a dialog box if there is any error in the form input. The code works in the sense that the dialog box appears but at the same time the code snippet bootbox.alert("Hello world!"); is shown. I tried many things, amongst others the obvious of putting <script> tags around the code but code does not get executed. <form class='form-horizontal' method="POST" action="">
finger event taphold
Hello everyone I have a question you can capture the state of the finger or mouse during taphold for example $(document).on("taphold",".div",function(e){ if the finger is still pressing { alert("down"); } if the finger is still up { alert("up"); } });
Ajax and Json
Hey I have a small Question about Json, I am trying to retrive some values following some little tutorial ive seen . and trying to add new stuff to it. so here it gos so my error is 100% in this function SummonerLeagues(summonerID) I am sure about this cuase when I remove it I get my response for the 1st half. but when I add it back i get nothing in return I am fairly new in this consept can someone help me udnerstnad what I am doing wrong ? <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
maintain position when positioning is changed
Consider the following <div id="pearent"> <div id="child"></div </div> the pearent has static positioning Is there any easy way to read what the top and left properties of the child would be if it had fixed positioning. answer this question for both a child with absolute and a child with relative positioning.
How can I make this shorter? Maybe as a function?
Hi Guys, Is there any way in which I can shorten this code?: $(document).ready(function(){ $(".radio__label").focusin(function(){ $(this).addClass("focus"); }); $(".radio__label").focusout(function(){ $(this).removeClass("focus"); }); $(".checkbox__label").focusin(function(){ $(this).addClass("focus"); }); $(".checkbox__label").focusout(function(){ $(this).removeClass("focus"); }); $(".checkbox__label--error").focusin(function(){
how to display base 64 image and dynamic fields in grid/datatable
Hi frds I have got this json output. I want to display this in grid/jquery datatable. I have got base 64 characters (for image).I want to display photo as well as dynamic fields in grid. I have used 1 plugin. only static fields i got in grid. please help me how to do. Reffered plugin :http://www.jqueryscript.net/table/jQuery-Plugin-To-Convert-JSON-Data-Into-Data-Grid-Columns.html this is my json file [{ "student_id": "1001", "admission_section": "a", "admission_date": "12/01/2015",
jQuery Slider returning/reading values on the Server
I have as ASP.NET application, it uses Bootstrap sliders, but the customer wants changes to the slider and changing the Bootstrap slider appears a nightmare, he has provided me with a sample jQuery slider that does what he wants BUT swapping the 2 sliders presents me with a server side problem - how do I initialise the jQuery slider with a database value, and on submit how do I read back any new value. Below is the server side C# code that works for Bootstrap's slider, but it uses an input HTML
Add to jquery unserialise function
First, my English is poor We can get the corresponding URL via jquery params method,like that: var params= '{ "a": [ 0, [ 1, 2 ], [ 3, [ 4, 5 ], [ 6 ] ], { "b": [ 7, [ 8, 9 ], [ { "c": 10, "d": 11 } ], [ [ 12 ] ], [ [ [ 13 ] ] ], { "e": { "f": { "g": [ 14, [ 15 ] ] } } }, 16 ] }, 17 ] }' $.params(params) /*get params a[]=0&a[1][]=1&a[1][]=2&a[2][]=3&a[2][1][]=4&a[2][1][]=5&a[2][2][]=6&a[3][b][]=7&a[3][b][1][]=8&a[3][b][1][]=9&a[3][b][2][0][c]=10&a[3][b][2][0][d]=11&a[3][b][3][0][]=12&a[3][b][4][0][0][]=13&a[3][b][5][e][f][g][]=14&a[3][b][5][e][f][g][1][]=15&a[3][b][]=16&a[]=17
jQuery datepicker entered invalid date is resolved to another date
I am using the jQuery datepicker. When I enter an invalid date like 1-1-0004, this date will be resolved to 1-1-1994. When I enter 1-1-2004, this date will be resolved to 1-1-1944. Why is this happen? I can reproduce this on the jQuery datepicker demo page. I would like to avoid this situation. It needs to be only possible to enter valid dates. And the date you enter needs to be same as in the datepicker. Not resolved to another date. $("input.field.date").addClass("ui-datepicker").datepicker({
jquery accordion with radio buttons
Hi, I have an online delivery page and I want in the last page to let user to select the delivery from existing addresses or enter a new address. I though of having a jquery accordion with radio buttons so it will be like this: ( * ) My Work ( * ) My Home ( * ) My Brother House ( * ) Enter a new address so the first three populated from the database and will show the details of the address when the user expand it and the Enter a new address will expand with a textbox to enter the new address. What's
Show photo gallery from database
Hi, I would like to show a photo gallery from a database but I don't want to download all pictures during the page load because there will be hundreds of photo so what;s the best way to do this without having to load all pictures? Thanks, Jassim
Autocomplete with categories from database not working
I have product names and categories from database fetched with PHP: $findNames=$user_home->runQuery("SELECT productTitle, category from Iranga "); $findNames->execute(); $information=$findNames->fetchAll(PDO::FETCH_ASSOC); foreach($information as $item){ $namesArray=array("label:"=>$item['productTitle'], "category:"=>$item['category']); } Then am trying to use collected data like this: var data=<?php echo json_encode($namesArray);?>; But it won't work, where could be a problem? <script> $(function()
event.preventDefault(); still post on production server
I use event.preventDefault(); function to prevent the page default post. The function works on my local developer server, but when I post my code to production server, it still refresh the page. Are there any configuration to set for the server? Your help and information is great appreciated, Regards, Iccsi
custom copy paste
i have a textbox in my jqm app. i need a custom text popup (similar to copy paste) appears on long press of the textbox, is it possible ?
sequence of js and css files
Hi, I am always confused how to order the js and css files for jquery and jquery mobile and jquery ui? where to put every file? is there an template to use and to include in every page? Thanks, Jassim
$(...).buttonset is not a function
Hi, Why I am getting this error: ncaught TypeError: $(...).buttonset is not a function here: https://www.cakeboutiquebh.com/before_submission.php Thanks, Jassim
Next Page