how to target nearby anchor
I have multiple accordions. If I have a link in one that anchors to text in another I need the destination accordion to open and for the + icon to switch to a - icon. I've got the accordion to open but am having trouble with removing the class that the changes the icon. Here is my html: <div class="panel panel-default" id="accordion11">
<div class="panel-heading" role="tab" id="headingaccordion11">
<h2><a data-toggle="collapse" data-parent="#accordion1"
trouble adding class to the closest div
I am trying to write a function that when an anchor link with a particular naming convention is clicked on in a page a css class will be added to the parent div. I'm not having any luck after hours of trying. On my test page I have two accordions. The link in the first one will jump to the text in the second one after it opens its accordion. I don't get any errors. But my second accordion is not open and I don't see that class "in" is added to the parent div. It's probably something obvious, but
jQuery library file in SharePoint
I'm trying to use the accordion plugin but the CDN is blocked when I use it in SharePoint, but not if I just plug it into notepad as a standalone web page. So I downloaded the libraries for the two scripts used, but am confused as to whether I'm supposed to take the folder and all the files init and just drop it into SharePoint and point to that folder or what? The script and style sheet sources are: <link href="https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel="stylesheet">
jquery calls javascript function that duplicate value
Hi all, I have this code to generate a list of img from a json array: $.each(arrf, function(idx, obj) { var id = obj.id; var tipo = 'foto'; var formato = tipo; var tip="Metadati foto\ndata: "+obj.data+"\nUS: "+obj.us+"\nnote: "+obj.note+"\nClicca sulla foto per aprire la scheda completa"; var tavola = 'upload/doc_scavo/'+ obj.path_tavola; var divFoto = $("<div/>").attr("id","divFoto"+obj.id).attr('class','divFoto'); $('.fotoContent').append(divFoto); var i = $("<img/>")
jqm 1.3.2 vs jqm 1.4.5 with jquery-1.12.4.min
i'm planning to pass from jqm 1.3.2 to 1.4.5. i obtained this screenshot... on the left jqm 1.4.5 and on the right jqm 1.3.2. The first thing i've to see is that buttons are not the same... on 1.4.5 are bigger and seems without padding. is it depending on theme? the right is theme e, the left is theme a (the only shipped with jqm). Thank you all.
jquerymobile 1.4.5 not working
I have successfully built a multipage template with jquerymobile 1.3.2 but can't get the same template to work with jquerymobile 1.4.5 <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" /> <script src="http://code.jquery.com/jquery-3.0.0.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
jquery and css in html dragging divs
Hi there, I plan to combine CSS and JQUERY inside HTML on a regular basis. Note that my knowledge of both is "below par". I found an excellent JFIDDLE example of draggable divs (link below). When I attempt to combine the CSS and JQUERY in a HTML file (code below the link) ... the divs do not drag ... What have I missed? Hoping for a hero to rescue me... Thx ... Kevin... http://jsfiddle.net/LQ4JT/7/ <!DOCTYPE html> <html> <head> <style type="text/css"> #box1 {width: 150px; height: 150px; background-color:
jQuery Files
I'm not sure when we download the files what we actually need to start. Right now I have these: jquery-ui.js jquery-ui.css jquery-ui.structure.css jquery-ui.theme.css
how to link to anchor in closed accordion
I am using the script below to link to anchors that are in closed content (accordions) on other pages. it works fine. However, I can't figure out how to edit the code to get it to open an accordion on the same page as the hyperlink. Refreshing the page works, but it's a cumbersome user experience. <script> var openAcc = '#' + window.location.hash.substring(1) if(openAcc != '#'){ $('#accordion .in').removeClass('in'); $(openAcc).closest('.collapse').addClass('in'); $('html,body').animate({scrollTop:
get multiple Scripts and then Callback
Hey there, I'm currently working on something to enable me to beta test some functions without changing the html file and still leave everything running normal for the user. To do this I'm doing the following. I'm stroring a beta-variable in the localStorage and when it is set to true i want to load the scripts from another location. That works perfectly well but since i want to do this with some more scripts now, i want to load all scripts first, then do a callback. So far it looks like this Script
Error: scrollPlay is not a function
Hi So, about two years ago jakecigar wrote that beautiful script that let's you fade audio volume in and out depending on scroll position. Here's in old thread about it: https://forum.jquery.com/topic/audio-fading-in-and-out-on-scroll-position And here is the original no loop version of jakecigar I'm trying to work with: http://home.jejaju.com/play/smoothFade/noloop Here is my try: http://zhdk.michaelkueng.ch/ I keep getting the error (index):81 Uncaught TypeError: $(...).scrollPlay is not a function
Tryig to make acording tabs in wordpress
I am trying to make according tabs in wordpress. What would be the best and easy way to make this work. I was at the jquary site and I had downloaded the ui-1.11.4-custom can you tell me if this is the plugin to use with wordpress. I am new to this and would like to learn.
How optimize 100 jQuery functions in one?
Hello I am new to jQuery and I would like to understand how can be optimized some Revolution Slider code they suggest to use to change slides from external hyperlinks. This is an example: // ".link-slide-1" is the class name we assigned to the main menu item jQuery('body').on('click', '.link-slide-1', function() { // revapi14 equals the API identified for the slider // revshowslide(1) will load the second slide revapi14.revshowslide(1); return false; }); This jQuery is working fine but the problem
How A/B Testing and Multivariate testing going to be done dynamically?
HI, I am new to the A/B testing please guide me how to perform How A/B Testing and Multivariate testing going to be done dynamically? 1)How variants are going to be generated 2)How visitors are tracked for each variant thank you.
Didn't find any thing when user types the text in jquery combobox
This is my Blog i have added the jquery combobox sucessfully from this but the problem is when user types the text and searches it wont appear but when user select the text i.e tag for exam grapes when user select it shows the out put. But when user types and leaves it shows didn't match any item iam uploading image will clear the question This is the link .attr( "title", value + " didn't match any item" ) which cause disturbance actually iam new to code. Any help really appreciable. The below
Error showing while concatenating in jquery
Hi, I want to concatenate 2 values to a function var jj = "\"" + final3 + "\""; var kk = "\"" + final4 + "\""; iam getting the value of jj="ChIJazgekzPfBTsR5s1JlN-ZYk4" kk="ChIJS8lvPfb8BTsRfBicz_I-A_8" i want to concatenate this value to a function in jquery as initialize ( jj + ',' + kk); this will not work if i write like initialize("ChIJazgekzPfBTsR5s1JlN-ZYk4", "ChIJS8lvPfb8BTsRfBicz_I-A_8"); this will work my requirement is to write like this initialize( jj + ',' + kk); I
Im new to jquery and web design. i need help ASAP.
Hello, I'm casey , I am trying to build an image slider using jquery and the cycle plugin but my slider won't work. I don't know coding but dreamweaver has been great with helping me through that. Please I would paste my code so someone can tell me what I did wrong and how to resolve it. Thank you very much. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type"
Reading duration of a video
Hi all, I'm developing a site where in i am adding videos as below: <div class="container"> <h1>jQuery WMBox Plugin Demos</h1> <a class="wmBox" href="#" data-popup="videos/v1.mp4"> <img src='images/v1.png' /> </a> <a class="wmBox" href="#" data-popup="videos/v2.mp4"> <img src='images/v2.png' /> </a> </div> How can i get the duration of the video in jquery. I tried the below javascript functionality $(document).ready(function(){ $('a[href]').each(function(){ var data= $(this).attr('data-popup').duration;
Adding details to an already set Textbox
Hey there, I was wondering if maybe you can help me. I'm still no real expert on manipulating strings. This is what I'm trying to do. I have a Textbox that has text something like this XX.XX.XXXX (european date Format) Some Text to that date XX.XX.XXXX Some more text to that second date I wand to wrap a complete Text in a <details> tag, and the date itsself in a <summary>-Tag. So far so good. I created a pattern and get the indexes of the dates by var pattern = /\d\d.\d\d.\d\d\d\d/g; var indeces
Ajax Call Does Nothing
Hi, I am completely new to jQuery and Ajax, and I am trying to get a basic Ajax call to work with a simple HTML file called test.html. In my JavaScript function I make the following call: $.ajax({ url: "test.html", cache: false success: function (html) { $("#text").append(html); }, failure: function(){ alert("Error"); } }) However, when the function is called, there is no evidence that the Ajax call is being made, because
return false prevents radio button click
I have a set of radio buttons. One is set to Yes. I want it to be set to know, without refreshing the page. Here is my javascript: $(document).ready(function(){ $('.RadioLogic').click(function(){ var $this = $(this); var WhichRadio = $this.attr("ID"); var selKeyVal = $this.attr("value"); var url_to_load = 'server stuff'; $('#div1').load(url_to_load); return false; }); }); What happens here is that the load works great, but the the radio button doesn't stay
comma separated autoomplete jquery when source is static
I have a textbox txtLocation which has autocomplete set. Now the requirement is when user press comma then again autocomplete should work. Please suggest. $(document).ready(function () {
$("input#txtLocation").autocomplete({
source: ["Gurgaon", "Delhi", "Noida", "Chennai", "Kolkata", "Ahmedabad", "Bengaluru", "Pune", "Hyderabad",
"Mumbai", "Chandigarh", "Dehradun", "Lucknow", "Mysore", "Faridabad", "Jaipur", "Coimbatore"]
});
})
Internet Browser develoment console command that returns the jQuery file location
Hi All, I am very new to jQuery programming and am trying to find an Internet Browser development console command that can return the jQuery.js url. This will also confirm that jQuery has loaded correctly (e.g. document.? or window.?) So if I am using "https://code.jquery.com/jquery-3.0.0.js" I can run a command that will return the "jquery-3.0.0.js" url I hope you can help Colin
Iam a Beginner
Hi all, Iam learning Java using tutorial sites.. Java Tutorial Is it necessary to learn JAVA SCRIPT before studying jquery..
Positioning an absolute positioned element with jquery
I'm having an annoying issue trying to position the responsive navigation hamburger. I am using a plugin called responsive menu which creates the hamburger and uses absolute positioning. I am trying to position the hamburger in the centre of the header at all times. To achieve this I am using the following jQuery code. However, the issue I have is when the hamburger is displayed and you scroll down the page and scroll back to the top of the page quickly. The hamburger does not position itself in
Link requires 2 clicks to show current info
I'm working on adding the ability to download a Hi-Res version of an image that is in a gallery that utilizes the Elevatezoom plugin on Drupal based website. I've got to the point where I can get the correct image to open in the new window, but only after clicking on the thumbnail image twice! The first click seems setting the link to the currently displayed image(the main image updates, but the link to the hi-res is to the previous image). For example: The page loads with Image A showing in main
Function with arguments not working with window.onblur and onfocus
The following code isn't working window.onfocus = welcome("John Doe"); window.onblur = bye("John Doe"); function welcome(name) { $("p").append("Welcome back " +name+ " <br>"); } function bye(name) { $("p").append("Good bye " +name+ " see you soon <br>"); } However I noticed that this code works for custom functions that dont take any argument. See code below. The following code is working: window.onfocus = welcome; //No Argument here so this code works window.onblur = bye; //Same here... No argument
Jacob Wagschal Intro to jQuery
Hello everyone my name is Jacob Wagdschal and I just wanted to let everyone know that I'm brand new to jQuery and wasn't sure if someone could help me become more familiar jQuery. I wasn't sure exactly what plugins would be best for me to use. If someone is very tech-savvy and could get back to me that would be great, thanks!
using url queryparam name in .js files
Hi.. i am new to jquery, my requirement is , when i click on a button, it will be redirected to some url whhich has some varibale name when i navigate in that new page i need to use that variable name to call other .js scripts any suggestions would be helpful
Start timer with mention time and date using js
Hello all, I have been trying to get the timer set with the mention date and time. Below is the code i tried so far. <html> <head> <title></title> </head> <body onload="timer();"> <script type="text/javascript"> function timer() { var now = new Date(); var outStr = now.getHours()+':'+now.getMinutes()+':'+now.getSeconds(); document.getElementById('clockDiv').innerHTML=outStr; setTimeout('timer()',1000); } timer(); </script> <div id="clockDiv"></div> </body> </html> The above code gives
Find position of option in select
I've a bit of code taking two lists of related data. A code and a name for an organisation. The code and name need to be in different dropdown lists (as directed from management). I'm populating the select options from an arraylist (in a jsp). Is there a way to find out out what position in the list of options a value is, in order to change the select in the other dropdown list. So if the third in the list of options for code was selected, the third in the list of name would change to the third option
Javascript div manipulation (Client-Side)
So I am new to javascript/jquery and I would love to have your guidance. I started managing divs and pages by this code: $(window).on('hashchange', function(e) // On Change Page
{
DisableAllPages(); // Disable all divs
EnablePage(); // Enable the div we specified
});
function EnablePage()
{
var fragment = window.location.hash; // Get the fragment we are in
fragment = fragment.substring(1); // remove first substring (#)
fragment = fragment.substring(1); // remove first substring (/)
$("."+fragment).css("display",
Creating a draggable div using jquery
Sorry, really new at this. So I used the jQuery UI to create a draggable div, like so: <div id="draggable" class="ui-widget-content"> <p>Drag me around</p> </div>I've also implemented the jQuery UI button, and I want the button, when clicked, to create a duplicate div, like so: $(function() { $( "input[type=submit], a, button" ) .button() .click(function( ) { $( "<div id='draggable' class='ui-widget-content'><p>Drag me around</p></div>" ).appendTo( "body" ); });
Dynamically created CheckBox -- Can't set/clear
I have a simple html table. I take one of the cell and change it into a checkbox with the following code: Stemp = $td.eq(i).text(); // get loaded wanted value if(Stemp == 1) $td.eq(i).html('<input type="checkbox" class="btnCHK" checked>'); else $td.eq(i).html('<input type="checkbox" class="btnCHK">'); The browser displays the cell now as a check box and allows me to change it's value (checked/unchecked). At time I need to clear the checkbox with code ... here is the issue --- nothing I do will
easy Autocomplete
hi you all. i've read this jquery ui document: https://jqueryui.com/autocomplete/ <script> $(function() { var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Scheme" ]; $( "#tags" ).autocomplete({ source: availableTags }); }); </script> it's very easy... but a question: how can i insert in the select also the value?
Problem with relationship between variables
Hi guys, I'm pretty sure this question has been asked before but I couldnt find anything even though I tried alot of different descriptions for my problem. So this is what I do. I have a js-File that basically looks like this abc = function(){ var initialStartTime = new Date(); return{ init: function(){ currentAgenda = ...//something from localStorage initialStartTime = new Date(currentAgenda[0].startTime) }, updateAgenda: function(){
Enable Disable
Hey, I am a newby in JQuerry. I want to disabled item1 when item 2 is null and nable it when it have a value. I use it if ( $( "#P1_NEW" ).length ) { $("#P1_NEW_3").attr('disabled','disabled'); }else{ ("#P1_NEW_3").attr('enable','enable'); } It work when Item2 is null--> item1 go disabled wehen item2 has a value--> Item is not Enable. Can you help me. Thank
ajax sessions
Does jquery perform the ajax associated http / tcp session or is that passed to the browser to accomplish? Is it assumed that the ajax call closes the tcp session at the calls completion (I see an open for ajax but no close)? I ask because .... My jquery application is being used by a micro running my own web server. As of today, I limit the number of open sockets (tcp connections) to 3 for performance and resource concerns. When Chrome opens a page on my web server -- it automatically open 3 sockets
jquery with events
I have a table td with an attribute of 'btn' to identify the button when the click event occurs. The event object appears to be a javascript object and the only way I have been able to retreive the attribute value is with the following code: var zz = event.currentTarget.attributes.btn.nodeValue; Is the an easier way using jquery? Thanks. Joe
Change td to type button
I am dynamically building/modifying a table. I have been unable to change the td attributes such that a button is displayed instead of text data. I've tried multiple things to no avail. Can someone point out the proper method for jquery to accomplish this? Thanks. Joe
Next Page