Drupal jquery.slicebox.js conflict
I currently have the slicebox library being used on a drupal 7 website. It's not a module and it's being added to a page content-type in hardcoded version: <?php drupal_add_js(path_to_theme().'/js/no_bug_jquery.slicebox.min.js', 'file'); drupal_add_js(path_to_theme().'/js/no_bug_jquery.slicebox.js', 'file'); ?> My problem is that the 1st file (jquery.slicebox.min.js) is in conflict with other .js scripts found on this page. If I remove that 1st file, the other scripts work fine but I can't display
unload is deprecated - is there any substitute for leaving a page and firing an event?
When I leave a webpage, I need to clear all the timers that I had previously set with 'setTimeout'. Microsoft Edge may have a bug where it doesn't turn them off, -- I'm not sure, but a bug I'm encountering would be consistent with them having a problem. Anyway, I looked up the jQuery documentation, and found that the 'unload' event is deprecated. So what can I use that will tell me when either the page is left, or if that is impossible, that a link has been clicked that goes to another page, or
select multiple & show both contents
hi I have this website. http://shumoni.com/demo/quotations.php there are multiple items in the Products, when I select one, it shows the data of that related products, but when I select both, it suppose to show both data in the field. but its not doing it. let me tell you more about it. when I select EZSpeed, then it shows Type, then from there I can choose New/Repair/Both. I want to select both from the products (EZSpeed & EZEnergy), & then it should show me New/Repair/Both, & from there if I
understanding the .append() and .remove() behavior
I don't understand the `.remove()` behavior here of `$postNav.remove();` In the snippet below if the first time you click on "I'm a tag" the `.remove()` does work as expected deleting the `<li>` and `<ol>` respectively, but the second time you click on it only the `<li>` is deleted and not the `<ol>`. And i don't understand why the beaviour is different here, has the html remain the same… i have created a jsfiddle which repro the behavior and avoid a too big post, thanks in advance for any help.
PARSEINT REQUIRES
1. PARSEINT REQUIRES A RADIX: Please make sure you are supplying a radix for all parseInt(). 2. 2. PROPER EVENT BINDING: Consider using the preferred .on() method rather than .click(), .bind(), .hover(), etc. For best performance and concise code use event delegation whenever possible: please somebody answer this...
How to get calendars in french ?
Hello I 'd like to get my calendars in french so, I add a first function in my code but it doesn't work. Can you tell me what I did wrong ? Thanks <script type="text/javascript"> $(function() { $.datepicker.setDefaults($.datepicker.regional['fr']); $('#datepicker').datepicker({showWeeks: true}); }); $(function(){ $( "#from" ).datepicker({ //defaultDate: "+1w", changeMonth: true, numberOfMonths: 1, dateFormat: 'dd-mm-yy', onSelect: function() { var date = $(this).datepicker('getDate');
Radio's ID and Value for a Survey
Hi, I have below code and I want to pus the info below to a .ajax to send it to my PHP but I want to have the ID of every question assign to it then my jquery send it because I want my database to save the question_id and the value for the radio group. something like this: <div class="questionItem" QUESTION_ID="7"> 1. Overall, I was satisfied with my experience at Aroma Cafe.<br /> <div data-bind="dxRadioGroup: { items: [ {id: 1, name: 'Strongly Agree'}, {id: 2 , name: 'Agree'}, { id: 3,
jQuery NoConflict
Hi all, I am using jQuery and Sharepoints SPServices library(to perform GetVersionedCollection operation as mentioned here https://social.msdn.microsoft.com/Forums/office/en-US/e7089153-cd8e-4c38-874c-2ca388b877c0/read-versions-of-comments-field-using-javascript-client-object-model?forum=sharepointdevelopmentprevious. But when I call the SPServices utlity with $().SPServices.... , it says $ is not defined. So I did var jq=$.noConflict(true); and used jq().SPServices and it worked fine. My form also
jQuery - reading data from html table
I have a html table with only one almost empty row but more rows can be added/deleted by user(click the button). User has to input data in a few rows and the jQuery script has to read it and make some calculations and then fills the rest of table cells(and two other fields under the table). And here's the problem. The jQuery reads/loads the data only from first row. It will work for the second row ONLY when i will change something(input) from the first row or i will fill the second row in the first
How to remove (indirect) parent element with class="foobar" only?
Assume we have the following html structure: <div class="aaa"><div ....>... <div class="bbb">...</div> </div></div> <div class="foobar"><div ....>... <div class="bbb">...</div> </div></div> Now I want to do the following: - Search for all <div> elements with class="bbb" - then (for each found element) go (one or more levels) upwards and search for a(nother) <div> element with class="foobar" - If it exist then remove this <div> element with class=foobar. Otherwise do nothing It the sample above only
Create Shapes based on user scroll
I'm looking for some help how I can create paths using paper.js based on the user scrolling wrapped in jQuery ? I was thinking using Adobe Animate but thought it may not be able to accomplish this even though it implements Canvas, HTML5 for all devices better then older technology such as paper.js; which I hear is slower for tablets for which I want to target up to desktop\laptops.
Uncaught TypeError: Illegal invocation
Hi, I am getting the above error and can't figure our why? kindly help.. This is my code: var formData = new FormData(); formData.append("login_name", "731004167"); formData.append("login_password", "Jassim@2013"); $.ajax({ type: "POST", url: 'signin2.php', dataType: 'json', data: formData, }).done(function (data) { console.log(data); // DevExpress.ui.dialog.alert('BlueFile', 'Success!'); if (data) { BlueFile_Mobile.app.navigate("my"); } else {
Ajax error: 500
i was adding some new product to my database in the back-end all is working fine, but once i've moved to the front-end I've found this error (Failed to load resource: the server responded with a status of 500 (Internal Server Error) and (jquery.min.js:4 POST 500 (Internal Server Error)) Anyone can help me to solve this?
jquery calculations on run time
here is fiddle https://jsfiddle.net/n353t1dt/ i want to write qty and price it will show me result by multiplying both values in total and in net total field it will show me sum of all totals can any one help me
select value to show another hidden dropdown box
Hi I have this website http://shumoni.com/testing/quotations.php I have got this code from this forum. here is the code $(document).on('change', 'select[name="Discount"]', function() { var $select = $(this); var $partnerBlock = $select.closest('.col-md-2').siblings('.partner'); if ($select.val() === 'Yes') { $partnerBlock.addClass('show'); } else { $partnerBlock.removeClass('show'); } }); when I will select Discount "Yes", only then it will show me the Partner with partner list. The Partner will
Catch a jquery event from select box, change number in a link and open the payment gateway
Hello everyone! Pls, help. Need a select box that would catch a jquery event (on select) and change the number in a link (by a variable) and open the payment gateway.
Loosing the href value while .clone() & while doing .empty() help needed #javascript #jQuery
HTML: <ul class="SegmentCommandsMenu"> <li class="segmentCommandReserve" style="display: list-item;"> <a href="javascript:openReservationPopup(4299,0,720)"> <img src="/QFlow/Images/Calendar/reserve.png" border="0" alt="Reserve">Reserve</a> </li> </ul> Jquery: var el = $('li.segmentCommandReserve').clone(); - this returns the value but the href is "" but then i tried to do set the value of href by doing the below: el.find('a').attr('href',$('li.segmentCommandReserve').find('a').attr('href'));
SharePoint 2013 Jquery Error-"Uncaught TypeError: Cannot read property 'each' of undefined"
Hi, I am getting error while executing below code and image error-Uncaught TypeError: $ is not a function <script type="text/javascript"> $(document).ready(function() { var sPath = window.location.pathname; var sPage = sPath.substring(sPath.lastIndexOf('/') + 1); var isOnlyReader=isUserInGroup('',__zurichReaderID,false); if I change $(document) to Jquery(document) than It shows error in interaction.js with below code and image Error-Uncaught TypeError: Cannot read property 'each' of undefined
Page reloading with e.preventDefault + unable to appen more than once
Hello, I am struggling with 2 problems, the first one is that I can only run the "appen" function once, and then even if I keep clicking on the function, no more than 1 click of data is added(at least the external file is pulled correctly). My second problem is that when I try to delete the appended data, the page delete the 2 fields from the external file but refresh the page while doing it Any idea why I am experiencing both issues please? Here is my code: <div class="col-md-2"></div>
How to use jquery to return a text value?
Hello, I was using ajax on my webpage to process my xml files, however, I wanted to process more than 1 xml file at any given time and started learning jquery. I am a beginner. I simply do not understand the way the function returning a value. If I use the alert() function just before the return statement (highlighted in red), then the main function calling the subroutine, receives the value returned, else it is a blank value. A short program I wrote is given below: --------------------------------
JQuery on Inspiration tablet
Browser: Chrome 55.0.2883.91 OS: Android 6.01; NS-P10A7100 Build/MMB29M I'm having problems with a menu system written in JavaScript. Direct selections off the menu work, pull down menu selections do not. JQuery .ready event handler is the only JQuery used. Works fine on IE, Firefox, Chrome 55.0.2883.87 m on Windows 7 x64 laptop, Safari on Apple iPAD and iPOD.
stop setInterval on mouseleave
I'm trying to run a function every 1/2sec using setInterval on mouseenter & stop it on mouseleave. function checkRExist(xInter) { if ($('.g-recaptcha-bubble-arrow').length > 0) { console.log('reCaptcha Exists'); clearInterval(xInter); } } function stopInter(xInter) {clearInterval(xInter)} $('.g-recaptcha').on('mouseenter', function() { console.log('Mouse Enter'); var xInter = setInterval(checkRExist, 500); }); $('.g-recaptcha').on('mouseleave', function(xInter)
is jquery-1.11.0.js secure?
Is the jquery-1.11.0.js file secure? The file is hosted on https://code.jquery.com. I would like to know if the site is protected and secure so there is no opportunity for a “man in the middle attack” to spoof jQuery and provide malicious java code/java scripts via an altered file/code on our end? Is this file secure to prevent it from being altered?
Jquery & Box2D problem
Hello, I am working on a website where every text elements falls to the ground due to the gravity. I implemented gravity in my website, but the problem is that it won't stop falling. I want to set the ground to my own position and not to the bottom of the screen. Here is my problem.. I managed to do this with random shapes thanks to a tutorial. Though I have struggles with combining the different parts of codes in one code. I have two different options. In this option the text starts falling, but
passing particular json data to another page
In my project, I have a JSON file. I display the data that is parsed inside a list (ul) under a div with the class, "inner", and show only the name and cost of each product that you can see in my JSON { "product": [ { "name": "samsung galaxy", "image": "https://rukminim1.flixcart.com/image/832/832/mobile/v/z/x/samsung-galaxy-on-nxt-sm-g610fzdgins-original-imaenkzvmnyf7sby.jpeg?q=70", "cost": "RS.10,000", "detail": "Flaunt your style with the Samsung Galaxy On Nxt. Featuring a drool-worthy body and
IF THEN Issue jQuery(function()
Hi, I am really sorry to bother you folks with such basics but I am pulling my hair out over using an if statement with this function below. I have next to 0 java experience and have spend all day trying to get this working. I am trying to make a slider/calculator to allow someone to work out total cost/discount Inputs: Course Type Wanted (Drop down but would like an option list if I can figure it out) No of Weeks Outputs PricePerWeek (Works OK) TotalToPay (Works OK for now but will
Applying a lightbox to JSON Data
I'm trying to pull images from the spotify API and give those images a lightbox. I've created a lightbox for images before but just not with using JSON data. Not sure what my code is missing. Your help would be greatly appreciated. This is an example of the JSON data that I'm trying to pull from. Below, I've bolded the areas in my HTML, CSS, and Javascript which are directly related to the lightbox. HTML <!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
How to get children of each element in a collection?
I have a form that allows user to add a dynamic/variable number of periods and each period can have a dynamic/variable number of intervals. I want to be able to save to and reconstruct those from the database. I figured best way would be to save the number of intervals per each period. I set up a codepen here: http://codepen.io/bg17aw/pen/eBBzVo Questions: 1) I know something about auto-iteration, collections, jquery objects, children() but not enough. When I do a $(".classname") is it more appropriate
How to use "this" in a selector expression?
Can I use "this" in a selector expression? Something like $("this > childrenelement")..... I did see here something like: $(' > img', this) But where is this documented/explained better? Since "this" is a javascript keyword and not just a jQuery keyword, it would be interesting to have an answer from both jQuery and Javascript point of view.
JQuery method .html() doesn't add the full HTML content from JSON response
I have some HTML generated by php using `json_encode()`, which look like this: ob_start(); if ($my_query->have_posts()) : while ($my_query->have_posts()) : $my_query->the_post(); get_template_part( 'template-parts/content', 'test' ); endwhile; endif; $response['content'] = ob_get_clean(); die(json_encode(utf8_encode($response))); } This is how look the html from the php (wordpress posts): <article
Read Google News IMAGE only
hi, I want to know how can I read the Google IMAGE only from the responseData of Google News? Thanks, Jassim
Variable as selector
Hi, i am trying to use variable in selector but its not working. i declare a variable when i click on table name (RCDT) and then i use variable as table id. it seems variable value is not being used in table selector. i can get variable value outside of function. following is my code.. here is full code. https://fiddle.jshell.net/1mfgny9j/14/ Thanks, $('div #selectgroupname').on('click', function() { if($(this).hasClass('clicked')) { $(this).removeClass("clicked");
Reset file input
HI i have this form : <form method="POST" action="" name="myform"> <div id="line1"> <button id="delete1">Delete Row</button> <input type="file" id="filetoup1" name="myfile1" /><br> Nome:<input type="text" name="nome" id="nomeup2" value=""> </div> <hr> <div id="line2"> <button id="delete2">Delete Row</button> <input type="file" id="filetoup2" name="myfile2" /><br> Nome:<input type="text" name="nome" id="nomeup2" value=""> </div> <input type="submit" name="submitted" value="invia"></form>This is the
show hide a content
Hi I have the following website. http://shumoni.com/testing/quotations.php you can see there is Discount content with dropdown box "No / Yes" & next to it Partner with dropdown box. what I want is, when I select Yes from the discount, only then the Partner dropdown should show else it should be hidden in this page, by default the discount dropdown value is "No", so it should not show the Partner content when the page loaded. it should show only when "Yes" is selected from the Discount. thank you
checkbox + jQuery
Hello, I come to you because for some time I have been looking for the solution to my problem. I have a checkbox list with the same id each time. In my js I use the function (checkedval, optval), and I would simply add the class: active if the checkbox of the spotlight id is checked. thank you in advance
off topics
Hi I do apologies at the beginning for this post. I just stuck and could not find any way how to solve this problem or is there any resource so I can get help. thats why I post it here. and one kind request to the admin, please do not delete my post, here is the link http://shumoni.com/testing/page.php what I want is, when I will click "Save As Template" it should show me a message box or prompt box, where I can give a name of this template and it will save in the database (I already have the database),
show and hide nested divs using jquery
I am trying to hide and sow divs, I have done it in a primitiv way, and I want to do a smart function the problem is that the inner divs doesn't shows the functions name is showdiv() <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>hide demo</title> <script src="https://code.jquery.com/jquery-1.10.2.js"></script> </head> <body> <button id="div1show">show div1</button> <button id="div2show">Show div2</button> <a href="#" onclick="showdiv('div1');">Klicka här för div1</a></br>
JSONP request always throws error for sytax :
hi, I have the below code , i am fetching the json using jsonp , since i need to use the values returned. function logResults(json){ console.log(json); } var fetchProp = function () { console.log ('[exwprop] > invoke fetchProp () method.') ; $.ajax({ dataType: "jsonp", url: "http://localhost:8888/abc-samp-module-catalog/env", jsonpCallback: "logResults", type: 'get', processData: false, crossDomain: true,
Upload file , send response when upload is terminated
Hi , i must upload large file between 1 to 10 (size from 20 to 50 Mb ) , the script work but i must wait too many time to take the response. How can i change page and allow user to see other page , but work the php script in background ? this is my code: in datiForm i append file $(document).ready(function() { $("#upload").click(function(e) { $.ajax({ url: 'lavorazione_inserita.php', type: 'POST', //Le info testuali saranno passate in POST
JQuery & Working With SVG's
I'm working with SVG, snap.svg library and jQuery so I'm hoping I can find some help here. I have a fluid effect SVG number for my percentage loader which counts from 0-100 and whilst animating, changes the fill percentage of the text. You can see a live demo here. However, what I need is for everything to work via a variable which goes from 0-100 do do the following; Change the percentage value Change the loaded fill value Change the colour of the loaded fill value (see below) Side Note: I would
Next Page