Questions tagged [jquery]

231354 questions
1

votes
2

answer
454

Views

Choosing same option in select list

What I have is a html select list that is populated through jquery. Right now I have the change event so that when I change the option, the map refocuses on the POI. I'm trying to make it work so that when I click on the same option, the map treats it as a change event. Options don't support click e...
Nixon
1

votes
3

answer
1.6k

Views

jquery click to hide and show another button

I have two buttons set as hidden : I have a jquery where I check some conditions fetched from the database. Either one of the button will be shown and that depends on if the condition is 1 or 0..That means when I click any of the button it must get hidden and the other one must shown up..? But it's...
user2605321
1

votes
3

answer
69

Views

Textboxes matching table column width

I have this table with a textbox for each column (they are going to be used for filtering). The textboxes should be the same width as the corresponding column. This is as far as I've gotten (simplified version): http://jsfiddle.net/9uUpP/ Pseudo-code explaining what I am trying to do with my current...
1

votes
7

answer
947

Views

Detect specific field id on form change with jQuery

I have a simple form which currently uses jQuery to do some dynamic calculations based on user form input. Most form fields are disabled and their value is calculated using the values of the non-disabled fields. Part of the calculation involves an AJAX call to save the field value to a database. I c...
Roy
1

votes
1

answer
1.9k

Views

jQuery trigger not working in Safari

I have a input type file, I set it display none and use the other button to trigger it. I test on every browser, works fine but Safari. $("#file_button").click(function () { $("#image").trigger('click'); });
Ben
1

votes
2

answer
1.2k

Views

invoke tinymce preview from outside

I have TinMCE installed and now I would like to invoke the preview functionality from outside the editor. I mean when another preview button in clicked, it needs to invoke the tinymce preview so that I can see the preview popup. This is possible ?
Happy Coder
1

votes
2

answer
1.1k

Views

Accessing stringified JSON objects

As another user in my other thread suggested to post another question here in regards to explaining how to access JSON Objects. The code I am using is: $(function () { $.getJSON( "https://api.guildwars2.com/v1/wvw/matches.json", function (data) { $("#reply").html(JSON.stringify(data)); // or work wi...
user2593573
1

votes
3

answer
1.5k

Views

Using jQuery validate rule twice for a field

I'm trying to validate an input field that holds a user's date of birth, and I need to do two checks - 1. Make sure the user is 18 years old and 2. Make sure his/her age isn't over 100. My custom validate method - $.validator.addMethod( "datediff", function(value, element, diff_years) { var curr_dat...
GPX
1

votes
3

answer
888

Views

URL not showing request parameters

I am taking some data from user-2 paramerters(using JS,html,jquery) , when user pclicks on GO, then calling servlet, passing these two parameters in get request: $.get("/Myservlet?param1="+myval+"®ion="+myregion,function(data){addToTables(data);hideLoading();},"text"); Servlet is returning data f...
ALBI
1

votes
2

answer
1.7k

Views

is there any options to display infoWindow automatically on page load

I'm using GMaps to display a map on my website. It is pretty easy to create a map with an infoWindow. However, the infoWindow only appears when the marker is clicked. My Javascript: var map; $(document).ready(function(){ map = new GMaps({ div: '#map', lat: 11.5671732, lng: 104.92592450000006, zoom:...
Tepken Vannkorn
1

votes
1

answer
82

Views

Javascript - Editing a class instead of ID not working / Editing the heigh of a class

Well, I tried to make something with JavaScript, but it won't work. I played around with document.getElementById('idhere').innerHTML('whateverhere'); and what not, and it worked fine. Then I was going to edit an class using document.getElementsByClassName('classname').innerHTML('whateverhere'); but...
prk
1

votes
1

answer
2.8k

Views

Ckeditor instance ready is not firing in chrome(some systems only)

Am using code as below: CKEDITOR.inline(document.getElementById('a'), { toolbar: ['Bold', 'Italic', 'Underline', '-', 'Strike', 'Subscript', 'Superscript'] }); CKEDITOR.on('instanceReady', function(ev) { alert("HI"); }); Ckeditor oninstanceready function is not firing in some system with chrome brow...
Vinoth Kumar
1

votes
1

answer
5.5k

Views

jquery validator addMethod not working

After much effort I've been completely unable to get the addMethod to work. The code i have is as follows: $("#submitform").validate( { rules: { org_name: "required", email_address: "required", phone: "required", abn: "required", description: "required", geocomplete: "required" }, messages: { org_na...
sapatos
1

votes
4

answer
54

Views

How can I change the ID of a cloned element using jQuery?

I am trying to clone a fieldset in a form, and append it at the end of others existing fieldset after renaming the fieldset's legend, and input fields. Everything is working fine, except the change of the cloned fieldset id. Either I try to change the ID via item.children('fieldset[id^="block_"]:fi...
bouchon
1

votes
1

answer
82

Views

jquery- Adding <option> tag inside <select>

I have a drop down list like Value 2 Value 3 I want to add one extra tag at the top like Value 1 Value 2 Value 3 How can i do it with jquery.
1

votes
1

answer
5.7k

Views

On mouse hover show a div like jQuery Tooltip

Let consider fallowing scenario jhony ram lilly $(function() { $('p').hover(function() { $('#about').show(); }, function() { $('#about').hide(); }); }); Know on mouse hover on the p tag a div will showed,But it is taking always a fixed/absolute position,But I want to show it with respect to hov...
manchu
1

votes
2

answer
57

Views

Html Table width automatically expands

My table width automatically expands beyond div width. I searched a long time but I can't find any answer. I don't know where the issue went wrong too. So please help after see the below images. other Image:
Yellow Flash
1

votes
2

answer
310

Views

Using empty CSS class to find HTML elements

I've come across some HTML that uses classes without any real CSS attached to them rather than id's just to group/identify them with jquery selectors: html: CSS: (nothing, just an empty file) javascript: $(".someClass").each( ... ) I think I know why they do this: because html elements can only have...
user1884155
1

votes
1

answer
1.6k

Views

HighCharts: pie slices need background images

I'd like to use a background image for each of my pie chart's slices. Is this possible in High Charts? I can't find an option to specify a background image for each slice. Here's a simple fiddle I put together: http://jsfiddle.net/3KyeL/ (just putting this here in case it makes life easier for someo...
StackOverflowNewbie
1

votes
6

answer
1.3k

Views

How can I detect a html class with javascript?

I use these three lines of code to detect lesser internet explorer versions. Using javascript, how can I find out whether or not the lt-ie8 class is enabled for the element?
ben
1

votes
1

answer
192

Views

Dynamic added elements double effect after page transition

I have added dynamic from jQuery in my code, but when I go back one page and return to the page where the 's are added and you press them, they somehow click twice now. I have tried with an alert('something'); when I click: $(document).on('click', '#products a', function() { alert('something'); } A...
Emil Moe
1

votes
1

answer
1.6k

Views

How to highlight a jsTree node based on a specific value?

I am using jsTree to build my tree within Oracle APEX v4.2, which all works fine. What I am after and unsure how to do is, whenever a node in the tree starts with the letter 'S', within the whole tree, I would like to highlight these nodes only with a background colour of say yellow. Example of res...
tonyf
1

votes
1

answer
1.6k

Views

JSON.stringify() - Escaping Issue

I am currently using AJAX with JQuery to send json to an API server. However, there seems to be an issue with a server that is escaping the JSON string when I use JSON.stringify() but on another server when using the exact same code it works without any problems. Here is an example of the Javascrip...
Daniel West
1

votes
2

answer
4.7k

Views

Phonegap Build - No App Icon on Device

I have a small mobile app that was uploaded to Phonegap Build to bundle the app for different platform, I only insterested in the android bundle for now. The challenge is after uploading the app and phonegap gives the apk I install on my device, the icon to launch the app on the device is the generi...
kolexinfos
1

votes
2

answer
822

Views

What's the reason that document.getElementById works but jquery doesn't?

This question might seem elementary to some but I can't get my head around it. I am working on a XMLHttpRequest Ajax file upload. the first step is to selected the fileUpload element that is on my page and for some reason javascript works but not query, here's the following two lines: var fileInput...
Mutu Yolbulan
1

votes
1

answer
944

Views

jQuery datatable - update “Processing…” message after x seconds?

I'm using a jQuery datatable with Bootstrap v2. When the page first loads, it displays "Processing..." which is good. It also displays this message when I change pages or sort - also good. Most of the time the database on the backend is quick and the Processing message is only on screen for one seco...
user2838966
2

votes
2

answer
39

Views

how to toggle text when checkbox(es) are checked and hide when nothing is checked

When checking a checkbox, the text Checked is shown. When unchecking all the checkboxes, how can I hide the text Checked? $('.rafcheckbox').click(function() { $(".rafoptions").show(); }); Checked
mudraya katusha
-1

votes
0

answer
31

Views

why does jquery ajax request only write one data field?

In this code here, i want to save two data objects in a DB, but it only writes one of them, as you can see in this screenshot from the Atlas web portal: Here is the code: $('form').on('submit', function(){ $('#taskMakerForm input').each(function() { $.ajax({ type: 'POST', url: '/calendar', data: thi...
griesgram
0

votes
0

answer
31

Views

Javascript-event listener not working in IE11

Is there any workaround for this bug in IE11. The code provided works fine for other browsers and Edge so I was hoping to find a workaround/solution here is the code: document.addEventListener('wpcf7mailsent', function(event) { var inputs = event.detail.inputs; if ('2425' == event.detail.contactForm...
Alfred M.
-1

votes
0

answer
22

Views

Support landscape and portrait images in bootstrap carousel

The goal is to display up to 3 vertical images on the screen. The images sizing allows up to 2 horizontals or a single horizontal and a single vertical if it fits. The sizing on the horizontals is about 66% or col-md-6, with the verticals being about 33% or col-md-4. I can't sacrifice the quality o...
Austin Sweat
1

votes
0

answer
13

Views

Slicebox showing no error, but still nothing on screen

The code is not showing any error in developer mode, but still not working. I took it from https://www.youtube.com/watch?v=q_RaXJhcwJE If you find any error or any mistake, please help me. The code's exactly the same as in the video but I think there might be some bug, or perhaps some additional fi...
Abdul Wahab
1

votes
2

answer
364

Views

retrieve data from database without refreshing the page

When the user press entre the data will be save into database. Ajax $('td.edit').keydown(function(event){ arr = $(this).attr('class').split( " " ); var clientid=document.getElementById("client").value; account_id=document.getElementById("account_id").value; if(event.which == 13) { $.ajax({ type:...
arok
1

votes
1

answer
28

Views

Remembering triggers in jQuery

[jQuery][1] always remembers your mouse triggers, either clicks or hovers. So if you mouse-enter and mouse-exit four times, it will execute that event four times. How do I make it "forget" the triggers, so that when I mouse-enter and -exit the trigger it only executes it once? EDIT: How would I do...
Chris Holstein
1

votes
1

answer
3k

Views

Need to send data back from a NodeJS server to a JQuery client

I'm trying to send some files and data back from a NodeJS server to a client that works in JQuery. I use res.sendfile() to return files from the NodeJS server, but that downloads the file on the client computer. I only want to send the file back to the JQuery code (Written in Typescript) and enable...
EternallyCurious
1

votes
4

answer
2.4k

Views

Cross-browser jQuery scrollbar operates with body tag

I want to override browser's native scrollbars. There are a lot of jQuery scrollbar plugins and I tried the majority of them such as jScrollPane, PerfectScrollbar, TinyScrollbar etc. I tried to apply them on body tag like below: $('html').css({"overflow":"hidden"}); //hide native scrollbars $('body'...
Nolesh
1

votes
2

answer
1.9k

Views

Scroll to the top of the page without refreshing/reloading of that page

I'm developing a mobile website. This website was mostly viewed in Opera mini and UCbrowser. I have added scroll to top button as but this on click it reloads and then goes to the top. some times, it doesn't work.. for details go to feinix.org/mevents.php in opera mini and ucbrowser view m.facebook...
Kanmaniselvan
1

votes
2

answer
19.6k

Views

Onclick event on list item

I'm trying to follow this answer, but rather than using a button as he does in his jsfiddle, I'm trying to use list items: http://jsfiddle.net/hqvDT/108/ It looks like it should work, but when I try to select some text and then press B (for bold), it doesn't actually bold the text. What's wrong? HTM...
Bagwell
1

votes
4

answer
81

Views

id selector vs input:file

I just ran into this weird behavior with JQuery: I've got one of these in my HTML: This didn't work: $pdfUrl = $('#pdfUrl'); But this did: $pdfUrl = $('input:file')[0]; How come? To clarify, I only have one id with pdfUrl in my document. Could it have something to do with the name and id being the s...
Difusio
1

votes
2

answer
912

Views

Display Javascript/Html/PHP as text

I am trying to display code on a webpage, just as text, for the user to view. The code snippet is obtained from a database, input using a form, and put in a div using PHP. Jquery is then used to replicate the html of that div in another element. The code from the database will never be executed; I a...
DVCITIS
1

votes
2

answer
89

Views

How to wrap elements with new class and remove inner wrapper?

For example: Hello Goodbye The output should be like this: Hello Goodbye
Navin Rauniyar

View additional questions