Capturing a URL with a specific pattern associated with diferent buttons
Hi, I want to capture a URL generating dynamically with a specific string inside associated with different buttons. For example I associated an AJAX url with a button whose url is having the pattern ****xyz=1**** . Associated an 'a' tag with another URL having a pattern ****xyz=2***. Depending on the type of element clicked .... I want to capture the url it is associated with it. For the 'a' tag it is pretty easy .... used this.href but how to capture for the button that is firing ajax??? Nil
Adding scripts to Adobe Muse lander - Possible?
Hi guys I hope it's the write place to ask this question, I'm new here and new to coding. I'm trying to use scripts that call the user's browser or location. Is there a way to do it in Muse? I have this small one line website for the test. Hoping for some help. Thank you guys :) Download the file If this is the wrong forum please point me in the right direction... thank you
Javascript cannot be loaded in another html file
Hello guys, I'm new at using jquery. And now I'm facing a problem. Let me use picture to explain it. Why are <span id="id_1"></span> <span id="id_2"></span> <span id="id_3"></span> cannot be loaded in display.html? and here is display.html as you know that I got that input field from input button at the sidebar. Somebody help me. Thank you.
mousemove not triggered. JQuery 2.2.1
Hi, Is there something I do wrong for not having my event trigerred ? I have the following script at the top of my cshtml and there's effectively a div with class name starting with "ResidentItem" In debug I see that it gets in the ready function and apply the mousemove but it never gets inside the function when moving the mouse on the item with class starting with ResidentItem <script type="text/javascript"> $(document).ready(function () { $('div[class^="ResidentItem"]').mousemove(function
simple frame contents() example doesn't work
Hi all, i created an example page regarding the contents() method to access a frame content but i can't get it work HOME.HTML <!DOCTYPE html> <html> <head> <title>Myhome</title> <script type="text/javascript" src="jquery-1.12.4.js"></script> (tried also 3.1.0) </head> <body> <iframe src="mycom.html" name="main" id="myframe"></iframe> <script type="text/javascript"> $("#myframe").contents().find("div").css( "background-color", "#BADA55" ); </script> </body> </head> </html> MYCOM.HTML <!DOCTYPE
ajax anti-cache issue in 3.X.X
Given a url (that was, for example, returned from a server after a prior ajax nocache request): /myapp/?_=1111&nextPage=2 and issuing a new jquery.ajax call with that url and cache=false will cause the request url to be changed to something like: /myapp/&nextPage=2?_=1112 which causes the request to be unrecognized. In jquery 3.0.0-alpha1 and prior versions, the ajax anti-cache code did an in-place setting of the anti-cache parameter and updated the url with something like: /myapp/?_1112&nextPage=2
Jquery pop up is showing all children instead of one
Hi, I wonder if anyone can help? I am displaying some advanced custom fields on my wordpress site. When the title button of each post is clicked, I need the content to appear in a pop up box. I have managed to code it, my issue is that ALL boxes are popping up when any title button is clicked, instead of just the single pop up box that is related. I did try wordpress forums as this is a wordpress site, but the button to add a new question in the forum isn't working :( I wonder if anyone can help
Get result from a div and send it back into an ajax call
Hello, I am struggling with this, I have 2 fields: [CODE] <div id="video_id"></div>//Results arrive here from first ajax call In the "video_id" div there is a response from an ajax call(after an upload). I need to take the text from that response and send it into another ajax call when the onchange is detected from the first ajax call. Here is my code of the second ajax call: Code: <script>
$("#video_id").change(function() {
var id = $("#video_id").val();
Chain functions with deferred and promises but without setTimeout ...
Hi Guys I need to execute 2 functions one after the other with the stuff in function "A" fully completing before the stuff in function "B" executes... I can't find an example that is not using setTimeout .. which is strange ... I have the following example below ( from here ) , is it supposed to work ?? How could I test if it is working ? what dummy code could I use to simulate the part //do stuff with SharePoint JSOM taking 5 secs to 30 secs ,say ... var a = function() { var defer = $.Deferred();
How to stop function after second click?
Hi all, as is it in title ... How to stop function after second click? And leave that div object on coords where that function stoped = mouse was second time clicked. My code is there ... my code thank you all for answers
ajax redirection not working
Hi I am using the Paypal API, this was all working fine a year ago then the project was put on hold, last year it was working via http I have changes this to https. The returning json object was stripped and the page went to the paypay url, to complete the transaction. Now nothing fires. here is the code $.ajax({ url: 'php/checkout123.php', data: {my_json_data: json}, type: 'POST', //async: false, dataType: 'json', success:function(data){ if (data.goto) location=data.goto; } }); and the response
Very Slow Loading Times for Jquery
Greetings... http://cdncoin.wpengine.com/product-category/gold/ I am using the following Wordpress Function with Jquery... <span class="aslowaspriceshoppage" id="ala'. $product->id .'"></span><script>jQuery( "#ala'. $product->id .'" ).load("'. $product->get_Permalink() .' .nfs_table tr:last td:nth-child(2)");</script> Basically... from the archives page it takes a particular WooCommerce Product and based on the Product Id it goes in and grabs a discount html div with table from the product and presents
Loader hiding
I want that my loader should hide only after the function is executed and i am not able to find the solution to this problem. as it runs async call so the loader gets hidden before only
Trying to check all text boxes on blur event that are a child
Hi I am trying to select all text boxes that are a child of form with a certain class. I can't get it to fire is this how I should do the selection? I am then checking multiple textboxes contain text then enable or disable a text box $(".cdform > text").blur(function() { if ($('#signup-Mobile').val().length === 0 && $('#signup-firstname').val().length === 0 && $('#signup-firstname').val().length === 0 && $('#signup-Address1').val().length === 0 && $('#signup-City').val().length === 0 && $('#signup-PostCode').val().length
array conversion error in jquery showing
hi following is a working example var totals = [0, 0, 0, 0, 0, 0];
var $dataRows = $("#GridViewProfit tr:not('.totalColumn, .titlerow')");
$dataRows.each(function () {
$(this).find('.rowDataSd').each(function (i) {
var k = parseInt($(this).html());
if ($(this).html() != '') {
totals[i] += parseInt($(this).html());
console.log(totals[i]);
// $("#GridViewProfit
Composing table rows to match the info
Hello. I'll try to explain my problem as best I can. (Also posted on SO So link ) Basically I have this entity array:11 [▼
"id" => "90ac3458-5fb2-11e6-a926-0a0027000004"
"startat" => DateTime {#505 ▶}
"comment" => "The former represent only themselves and the latter represent those who share their corporate identity\n"
"place_id" => "cd673b65-5d6e-11e6-b1ff-000d3ab2c2b6"
"sponsor_id" => "e12165d6-7c5c-2e23-eb3b-8828e39a0ede"
"tour_id" => "170e9b35-abb3-6337-96f6-342a6778d3c8"
"speaker"
"Break;"
What is the function of "break", in JQuery?
Need professional help !
Need professional help ! Remodel existing gallery under its own way. I want to remove the switch from photo to the next, and that would shut the photos from clicks on it and not on the X in the corner. Upload a picture file did not work. Threw on file sharing: http://fracton.rgho.st/68XLrryK2 I found the code: Use CSS3: enlarging a photo when clicked. <Style type = "text / css"> .vkl3> br, .vkl3> a: nth-of-type (2) .vkl3> br: target ~ a: nth-of-type (1) {display: none;} .vkl3> br {position: fixed;}
JQuery Charecters
In the following line of script, what do the charecters listed within the .split() denote?: var words = $( "p" ).first().text().split( /\s+/ ); Also, where can I get a list that would outline character selection when setting the parameters of JQuery methods (ie. just as was done in the script shown above this question)?
variables in eq?
There may be a better way around this....but I am trying to dynamically change the eq() value in a jquery statement. I have a form that refreshes itself on the zip of a form, and if someone selects the quantity of a product before entering info, then refreshes and goes to the eq(0) ...or any other specified eq() in the radio sequence. Trying to figure out a way from a radio button to alter a variable (easy part) to update a value or change the value in the eq() so both radio sets have the same
month restrictions on date-time picker
I try to select 2 month only ie. when i select date 1-06-2016 then to date must be 31-07-2016 means what ever user select date two months time period will be display how i do this in this code currently only 1 month is display ie. if i select from date 1-06-2016 then to date shows 30-06-2016 but i want to select 2 months <script type="text/javascript">
$(function () {
var currentYear = (new Date).getFullYear();
var currentMonth = (new Date).getMonth();
var currentDay
Updating jQuery
Hello awesome forum! I am currently working on developing my new site justmoney.dk, where jQuery is used to most of the action. All of my javascript is in one file, containing the most recent jQuery version out there. My question is: would it be an idea to refer jQuery separately, rather than mixing the two, in order to have the most recent version? Or doesn't it matter at all? Thanks for your replies. Peter
How to combine jquery(".class") and input[name*='some_text']
This is my first post, so hello to everyone. I am working with CMS Typo3 + extension MASK, which extents the backend form input fields. These fields are arranged one below the other and I would like to have them beside each other. .form-section + .form-section { display: inline; } does the trick, but unfortunately not only the new MASK-fields are lined up but all input fields in the backend are effected. So I tried to use jquery to select only those elements, which are created by MASK. The
Ajax Calls, .val() and Deselecting Highlighted Values
I have numerous input fields and when a user changes a value on any input field then hits the tab key, it moves to the next field (default browser behavior) and completely highlights the text in that field. This works as expected. On the blur event for the changed field, I send an ajax call to the server which sends back some values which updates every text field. e.g. When the user hits tab, the blur event is called, and the cursor goes to the next field and highlights all of the characters in
Dynamically adding input fields without JS using jQuery
Hello, sorry if this has been asked before here. I did some research and have not found the answer here. This is my first post as well, so sorry if I cannot explain everything properply. I am building a website (startet learning CSS, HTM and JS a month ago) that dynamically adds input fields regarding what number the user puts in. This works fine with a JS script I have found on the web (see here http://daviduhlmann.solutions/Testseite_VS1.0.html ). When I enter a number of sales people and run the
Increase visible text on click.
I am trying to increase the words that are visible when user clicks on the link. It does not seem to listen to the click command. How can I achieve this? My code looks like below. $(document).ready(function () { var $wordCount = 12; $("h2").on("click", function () { var $wordCount = 112; }); function getWords(str) { return str.split(/\s+/).slice(0, $wordCount).join(" "); } var str = $(".hider").text(); $(".showHere").text(getWords(str)); }); See work on fiddle
Serialize isn't working in the Fieldset inside form element.
Hi, I've a form, in which there are multiple fieldsets which consists various input elements, and I'm trying to serialize the value of the whole form. You can also read my Stackoverflow thread : http://stackoverflow.com/questions/38966515/how-do-i-get-all-the-value-of-input-fields-including-select-text-area-from-mu I just need to make sure if serialize works in my scenario or not, otherwise I do have to search for other solution. However it works if I provide the input value to the elements,
How Can I get the Blank Values of Multiple Select, Radio, Checkbox using SerializeArray()?
I want to serialize the blank multiple select, radio, and multiple checkbox if user leave the fileds blank. It seems like it can't be done with current SerializeArray(), is there any way to extend/override the method such that, I could achieve the result?
How can I highlight an area element using jquery?
I am new to Javascript. I have a background image (a graph) and many overlapping elements (rectangles) with associated overlay text that is positioned to the side of the graph. I would like to highlight all rectangles associated with a pixel each time I mouse over that pixel. In my code below I've succeeded in showing the overlay text for all rectangles associated with a certain pixel (not just the top rectangle in the z-layer). How can I also display all rectangles that contain the pixel that I
How to get content of a div from other local html doc
Hi everyone, first post here, I have 2 html docs the first one has a div with class "Img-container" and The second html has a div with class "Img-copy", how can i do to get The first class img src and get it on The second class when: I click a next Button on The first html that links to The second OR when The second html loads?
How to create complex nested json data
I have created a json file in this format how to achieve this. [{ "acdyr1": "2012", "acdyr2": "2013", "parameters": [{ "medium": "KAN", "academic_syllabus": "STATE", "class_section": [{ "standard": "LKG", "sec": ["A"] }, { "standard": "UKG", "sec": ["A", "B"] }, { "standard":
A href problem please help
Hello guys, I am new to JQuery use. I am making my website and i have this problem: I hosted JQuery file from google, and it works.. my Back to top arrow and navigation bar change works perfect with it. BUT JQuery blocked a href links from my site (Example social media icons, contact icons etc...) .. If i delete that link from HTML file links works fine, but without it my arrow and navigation menu don't work. Please help me how to have both of those tnx in advance.
How To Set A Startup Gif On a Website For Copuple Second not for until the whol site load .
Hellow can any buddy can help me on setting a Animated Startup screen on website for just 10 seconds just like this web , www.brightpaki.ml Please tell me how cani do that in the startup im exhausted and cannot find a way to do it . any way Thanks In advacne .
jQuery not running in WordPress
I see to get a strange problem in my website which is yogihosting.com. The problem is that jQuery is not running in it. Everything is correct and i have checked them multiple times. Even an alert is not running. However the code runs when i place it in a simple html file. My website is in WordPress i think that is is some WordPress feature which is not letting it to run. The code is - <script type="text/javascript" src="JS/jquery-2.1.1.js"></script> <script type="text/javascript"> $(document).ready(function
Custom "Back to previous page" button.
Hi, I created a custom "Back to previous page" button with the following function: function goBack() { window.history.go(-1); } Clicking on the button, brings you to the previous page. However if the page was a form, the values in the form fields aren't there any more. How can I extend the goBack() function, so that if I go back to a form, the form field values are still there? Thanks
Ajax validation issue with array
I am trying to validate my codeigniter based from using jquery ajax. in my form i have dynamic fields which generates fields name like fault[0],fault[1],fault[2]...... this jquery script i am using works only the ID attribute & NAME attribute of a field are same. since array fields have [] marks i am unable to validate them. i need to know a way doing this without id & same name rule. i think this part manages the validate the fields only with same name & id. $.each(response.messages, function(key,
How to iterate through children of a node and modify them?
I have an tag of type 'article' in my html page. I want to iterate though all its child and grandchild nodes, and give them an ID if they lack one. So I tried this code as a test: $(document).ready(function () { $("#ArticleToHighlightRFS").find("*").each(function (i) { alert (this.id); }); }) The idea is that 'find()' would get all descendant nodes that are not text nodes, and would list their ids. If they don't have ids, I suppose the alert box
Click on the link and make the browser is loading until you can redirect
Need help, I want you to click on a link while the browser continue to wait until I can make an ajax process, I have tried many ways but has no effect. How could you do this? Note: I need the browser is in the process of "loading" as if it were a normal link I have tried several ways but I can not have that effect. //example 1 $( "a" ).click(function() { $( ".result" ).load("ajax.php"); // this file php have sleep 10 seconds }); //example 2 $(window).unload(function()
Responsive Carousel jQuery & CSS
I've been working on this carousel for a few weeks now and about to quit. I've played with flex and css without any luck. I am hoping someone can tell me how to get this to reduce as the display reduces. I found I can reduce the number of slides displayed, e.g. start at 7 then to 5, then to 3 and then 1 is how I think it will go. However, I haven't created a site for a few years and I thought I could call these variants based on the display size. I was trying to call the different sizes for the js
Cross-browser compatibility
How do I force a URL to open in IE using jQuery?
Next Page