Questions tagged [jquery]

328155 questions
1

votes
0

answer
249

Views

Krajee's file input only upload last selected image

I'm working with this plugin in Codeigniter as I want to upload multiple files (either it can be multiple images, videos or files) and as mentioned there I have done the following code HTML Script $('#attachment').fileinput({ uploadUrl: '#', uploadAsync: false, showCaption: false, fileActionSettings...
Mr. Pyramid
1

votes
2

answer
407

Views

toLocaleString() not working no errors showing up

I'm trying to add commas to the input to both the value integers and the summary number in the middle. I've added $summaryNumber.toLocaleString(); but nothing works. I'm trying to understand what I'm doing wrong. here's a fiddle with what I'm working with https://jsfiddle.net/cmLkbq6e/2/ $(function(...
larry burns
1

votes
0

answer
44

Views

FlexSlider images will not load on tabs

I have 2 sliders in one page without tabs they are working properly. Check my screenshot below but when I try to apply tab-pane my second slider not showing Looks like this But when my minimize then maximize the page it will show. Here's my code below HTML {lang_media_slider} {lang_media_plans}...
Carlvic Lim
1

votes
1

answer
49

Views

Carousel's image is bigger I expected

Carousel's image is bigger I expected. My Code * { margin: 0; padding: 0; } .menu { background-color: gray; width: 500px; height: 100%; float: left; } .title { color: white; font-size: 30px; margin: 0px 5px; margin-left: 40px; text-align: center; } .first { padding-top: 30px; } h...
user8817674
1

votes
1

answer
102

Views

Read large (1G) binary file as it loads in Javascript [duplicate]

This question already has an answer here: filereader api on big files 2 answers I have always fully loaded binary files and then gone on to scan the content blocks within. This was fine for anything up to say 500K. I'm now looking at scanning files that are as large as 1G or higher. (Client side) L...
ChipAhoy
1

votes
1

answer
233

Views

How to install bootstrap 4 version beta.2 in an angular 4 application?

I tried installing bootstrap 4 version beta.2 and its dependencies (jquery and popper.js). but there is something very weird going on. for some reason, I keep getting an error message in the console, saying 'SyntaxError: export declarations may only appear at top level of a module'. when I click to...
Kenchi
1

votes
2

answer
62

Views

add/removeClass doesn`t work on iPhone

This works correctly on browser but doesn't work on iPhone. Also I used the var $event = ($ua.match(/(iPod|iPhone|iPad)/i)) ? 'touchstart' : 'click'; It also doesn`t work on iPhone HTML hello CSS .mod_section.active{ display:none; } .mod_section{ display:block; } JQuery function mod(){ $('.mod_secti...
Eric Lee
1

votes
1

answer
490

Views

ScrollTop goes to the wrong top

I have a list of items. When I click on one item (project) it opens (this is ok) and it scrolls to the top of the page (the wrong top!). The problem occurs when I have an opened item and I decide to open the one below: the top position is increased by the opened project height and the second project...
Lorenzo Toso
1

votes
1

answer
996

Views

Set Select2 selected values with JSON string

I have a select2 that's used to add multiple employees to a work permit. Adding the employees works with no issues but when the permit is viewed I need the added employees to be pre-selected on the select2. I can retrieve the values from the DB via ajax using a JSON string but the select2 only shows...
Drewy
1

votes
1

answer
29

Views

Remove data from the database when the remove button of a datatable is clicked

I am using a datatable to dispay information for the user and it is generated a delete button per row. I would like to delete the row data from the database when the user click on it. How can I do that? HTML ... $('#id_data').DataTable({ destroy: true, data:data_array_data, 'bLengthChange': false, /...
1

votes
0

answer
301

Views

Bootstrap modal, strange behavior (duplicate informations)

I'm using Laravel 5.5, Bootstrap 3.7 and jQuery. When I open the modal and close it directly, then when I do an action in the modal it performs two times the opening function. If I open and close it (directly) three times, then when I do an action in the modal it performs four times the opening func...
N. Lamblin
1

votes
0

answer
34

Views

JQuery DataTable to select only rows which has recent checkboxes status changed

Code is attached. I am able to get the status (true/false) of checkboxes. Now my question is.. Question: How can I get the rows only with checkbox status changed? Not all. Only got any code improvement for my below function Btn_SaveOrganizationsRights. Any optimization. Function Sorry .access-view e...
Ali
1

votes
0

answer
309

Views

“include” js and css file using a RELATIVE path from js file

Using Symfony 2.8.24 and jQuery 3.2.1 Been googling for this for a while now and, yes, there are lots of similar cases, involving using relative paths for resource loading but, none I have found which explains what I need, so SO: I need to include (or load or append to head or something) a css file...
Scaramouche
1

votes
1

answer
189

Views

DataTables - move tr row and “reload” table

I use DataTable with pagination (10 records per page). I allow my users to change the position of rows in this datatable and when table has 10 records or low - there is no problem. The problem is when pagination is in action (so when on page is more than 10 rows). Then I can't move for example secon...
Pavel K
1

votes
1

answer
258

Views

jQuery UI Autocomplete in MVC modal window

I'm trying to implement the autocomplete jQuery UI function in a Bootstrap modal window, but it does not work. screenshot module console debug Take the steps of not returning a partial view, also already implement jQuery CSS styles, the truth works for me in full views, but why when calling a modal...
Fytito Ambiado
1

votes
0

answer
38

Views

javascript template for showing table body

I am using ajax for updating/refreshing the cart when an item is removed from the cart table to show the updated items. ajax functionality and logic is working but could not show the following template inside {% for furniture in cart.furnitures.all %} {% include 'includes/carts/remove-furniture.htm...
pri
1

votes
1

answer
59

Views

Handling complex html elements with JavaScript/jQuery

I'm working with the FirstSpirit CMS. This CMS generates HTML-Pages in a similar way as php does. The code below shows a snippet from a module: var elements = { start: '$CMS_VALUE(getStartDate)$', ende: '$CMS_VALUE(getEndDate)$', alwaysVisible: $CMS_VALUE(st_alwaysVisible)$, html: [ $CMS_FOR(element...
Brotzka
1

votes
2

answer
985

Views

Uikit3 - call out modal programmatically

Something wrong with UIkit3 modal. I get to open it with simple command, as said in docs: var modal = UIkit.modal($('#select-instrument')); modal.toggle(); This does nothing. It returns Promise 'pending' If afterthat I call modal.toggle() again, then it does show the window. What am I doing wrong? H...
Denis Matafonov
1

votes
1

answer
67

Views

jQuery Chained - don't work on iOS

I'm using this plugin to get chained select's. It's working with desktop browser (FF, Chrome, etc...) but when I want to use it on my iPhone it's not working. I can select options from first select (for example city). When I select city, my second select should have locals from this city and that'...
MMPL1
1

votes
1

answer
213

Views

Applied css into Youtube frame or fix the thumb

I have a problem with a video embed from youtube which is not showing me the thumb. I'm trying to overwrite the css of .ytp-cued-thumbnail-overlay-image this class is located within the iframe of YouTube. I try to use jquery but I have a security error. Any viable solution? I am using the following...
yorchp
1

votes
1

answer
60

Views

star rating image not deploying to Heroku

I am having a bit of an issue, I am using this plugin jQuery Raty (rating system), I have the star images on my assets/images folder but for some reason, the images are not showing. Any idea of what might be? I already ran rails assets:precompile because I found this answer here, but no dice. It wo...
Lucky500
16

votes
3

answer
6.2k

Views

jQuery in Greasemonkey 1.0 conflicts with websites using jQuery

Ever since the new Greasemonkey 1.0 was released a few days ago, every site that has jQuery and where I use jQuery in my Greasemonkey script do not run my script properly. The jQuery I have in my GS script (using the @require metadata) conflicts with the page's jQuery. This is due to the new @grant...
Gary
1

votes
1

answer
865

Views

yii2 refresh modal after submit form

I want to ask how to refresh the modal after I submit the form in another action? I use yii2. Here is my code : index.php: The size button on my grid view will show the modal that returns the render ajax from action size in my controller. After that here is my size view: $form = ActiveForm::begin();...
Pasek Widi
1

votes
0

answer
238

Views

compare date strings to json date strings

A User selects a pair of dates from two jquery-ui datepickers, when the user selects the second date both values are compared to strings stored in an external JSON file. If the dates are within the dates below external data is returned to the html page. The dates look like this: 'startDate':'01/01/2...
ernesto fernandez
1

votes
1

answer
72

Views

Hiding some characters in URL bar using jquery

I have my URL like www.abc.com/some_folder1/some_folder2/page.php is there are any ways to hide 'some_folder1 or 2' In URL while it is displaying on URL bar like : www.abc.com/some_folder1/page.php or www.abc.com/some_folder2/page.php (have to just hide 'by keeping its functionalities unaffected')
Deepak Bharadwaj
1

votes
1

answer
258

Views

Slick JS vertical with two elements in same line

I've a problem with Slick. I need to display two elements in a same line with a vertically animation. It's working fine with the horizontally display. $('.slide').slick({ infinite: true, slidesToShow: 2, slidesToScroll: 1, pauseOnHover: true, autoplay: false, dots: false, arrows: false, vertical: tr...
Ayanei
1

votes
2

answer
128

Views

Trigger event if variable changes [duplicate]

This question already has an answer here: Listening for variable changes in JavaScript 17 answers I currently have a div which displays information such as DNS and IP address. I am trying to trigger an alert if the IP Address variable changes, so I've attempted both listening for changes to the div...
gjames
1

votes
0

answer
667

Views

Performance Navigation Type have same values in Refresh or Close

I'm trying identify the browser tab are closing or updating, but the navigation.type shows the same values. Chrome displays different types of buttons when updated or closed. Refresh: Button confirm says: 'Refresh' Close: Button confirm says: 'Leave' Can I identify, without bind keys event to set gl...
Thiago Miranda
1

votes
2

answer
225

Views

JavaScript not working in rails 5 app

I want to use static javascript files without using the gems in my rails app. My application.js looks like this //= require jquery //= require bootstrap //= require owl-carousel //= require rails-ujs And all of the Js file I have to add in javascript folder without using any gem using assets pip...
dev dap
1

votes
0

answer
54

Views

Adding code via addEventListener on ID's taken by AJAX

Yesterday, I've asked the same, but today I will try to be little more specific, with working example. I want to add some code by addEventListener. I would use DOMContentLoaded, but ID which I'm trying to select is not available on page load. It's taken by AJAX GET method. I could use mouseover, bu...
servitus
1

votes
0

answer
812

Views

select2 not using data- attributes

I am attempting to use select2 for my dropdowns in a .Net Core web site. I created a dropdown with: And then in my script put: $('select').each(function () { $(this).select2(); }); And when I run everything, my dropdown always responds with 'No results found' and the placeholder never appears. If...
DrewB
1

votes
0

answer
36

Views

how to validate my login id which might be phone or email using Jquery validation

for my login screen, User can login by using his email or phone number. Here i am using jquery validation plugin. Below is my code : $('.login-form').validate({ errorElement: 'span', //default input error message container errorClass: 'help-block', // default input error message class focusInvalid:...
1

votes
0

answer
373

Views

Adding legend into a pie chart in chart.js

I am using chart.js to add in a legend to my pie chart but because I am following this link, https://jsfiddle.net/red_stapler/9931gjh6/11/, to do it, I am unsure of how it works. Sorry I just started learning on how to create a pie chart so there are a lot of things I am still weak at. I want in my...
blastme
1

votes
1

answer
61

Views

Can I use javascript to retrieve the content header when setting the src on audio

I'm using the HTML5 audio control to play an mp3 file that is streaming from the server: And I am setting the src of that audio control dynamically, when a user clicks a button: $('#myBtn').on('click', function (e) { var audio = document.getElementById('audio'); audio.src = '/api/audio/f56i4gi8lh';...
Matt Spinks
1

votes
1

answer
58

Views

jQuery(ajax) submit form

I am having some issues with $.ajax post method. I would like my form to submit form data while on the current page, however for some odd reason my script is redirecting to the action page. Please could someone identify what's causing this to happen and how I can resolve this problem? Here is my scr...
Crossfire151
1

votes
0

answer
60

Views

html and php form will not submit to email?

I've been trying to submit a form that is on my website but the form will not submit. I am not a php expert and I can not tell where my error is. The php file opens instead of sending to my two emails. html and I have the php file in the main directory and it contains and my form validation is in in...
Alase Ruth
1

votes
1

answer
353

Views

How to use AWS Polly PHP SDK via AJAX to stream in HTML5 audio player

Goal: To synthesize speech via AWS Polly PHP SDK (not javascript), return audio blob to browser via AJAX request, and stream with HTML5 audio player. So far I have the query to AWS working and AJAX request returning the AudioStream resource to the browser, but Firefox is complaining about the format...
Hayden Seitz
1

votes
0

answer
312

Views

Bootstrap Modal doesn't scroll with Select2 dropdown

I have a boostrap modal with a select2 dropdown inside: ....
Kirill Simin
1

votes
0

answer
97

Views

jQuery LightSlider in Safari (WLAN) iPhone & PC Browser

on our company website, we are encountering some problems, with a jquery Lightslider, this slider isn't loading on safari on iPhone, Mac, and windows, but only if connected to the wireless network. If we are connected to the mobile network there is no problem with the sliders, here is the error mess...
user3469017
1

votes
1

answer
93

Views

Pass hash filter to external link (like Isotope but custom)

Example: If user click on specific link in one page, this link will redirect him to filtered content in a specific area. I try to build an custom isotope with simple hide and show classes but now I can not make my links connect with the filtered content of other page. *The hash is correct but it do...
Theodoros Vragkos

View additional questions