Setting Values from array
Hi, I have a dropdown and 2 labels in my aspx page. I am trying to fill the dropdown and the label using jquery. I have used the below code: //Declared Globally var testarray = []; var fileDescription = ""; var imagePath = ""; var Title =""; $(document).ready(function () { while loop //values added to each item { testarray.push(Title) + "$~@" + imagePath + "$~@" + fileDescription); } SortArray(); }); function SortArray() { var ddlImg = this.document.getElementById("ddlImages"); ddlImg.options.length
pass parms to JS
Hi i read a couple of tutorials an try do understand jquery. one question is in my head: normally i have buttons like HTML <button type='button' name='testbtn' onClick='dosome('1','cars')' value='T1'>T1</button> Now in JQuery i would do something like this HTML <button type='button' id='idtestbtn' value='T1'>T1</button> external JS-File $(document).ready(function() { $('#idtestbtn').click(function(){ ... }) }); How can i pass the parms"1" and "cars" to the jQuery Code for
Fetching value from label in jquery
Hi, I am using aspx, js file. I have a hidden div in which I have a label. The value of the label is added dynamically using aspx.cs code, and which is getting added. However I am not able to fetch the value in js file. I have used the below code: // aspx <script type="text/javascript" src="/Scripts/testSearch.js"> </script> <script type="text\javascript"> var lblCatId = "<%=lblCategory.ClientID%>"; </script> <div id="HiddenDiv" style="display: none;"> <asp:Label ID="lblCategory" runat="server"
Selecting a HTML Element with Specific Content String
Hi jQuery Genuises, I've been using jQuery for a while, but generally have only kept things pretty basic. I'm trying to parse through some <span> elements on a page, find one which has the content 'Workshop' (a string) and add some custom CSS to it. addClass() is a pretty usual thing for me to use, but I can't figure out how to have jQuery select the proper span. $('span') + ?? Any tips to send me to the right function?
New To jQuery. Can't Figure Out Why This Doesn't Work
Any help on this appreciated. I am completely new to jQuery. I am definitely missing someting... Thanks in advance for your time... <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Default functionality</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" href="/resources/demos/style.css">
<script src="/Scripts/jquery-ui-1.11.2.js"></script>
<script
what is hiding my banner logo
Hello All, I have recently completed my first roundabout carousel project with some success. When trying to implement a logo to appear above the carousel container I fail. And, I cannot comprehend the plug-in code. I'm attaching a gif of the two DW views to illustrate my intent. I'm including the CSS to the containers and a link to the test page showing the problem. http://www.jacksguitars.net/Printing/index.html Help? .my_carousel { position : relative ; width : 760px ; background : url( ../images/logo_banner
Resize window removeClass / addClass
Hi everyone, I'm really super new to coding and after some classes at codecademy I'm now doing some exercises on my own to eventually build up my own website. At the moment I'm trying to have js remove a class from a div and add a second class according to the window width (obviously, unsuccessfully) Here's my attempt $(window).resize(function(){ var st = $('.standard'); var al = $('.align-left'); if ($(window).width() < 600) { st.removeClass('standard'); st.addClass('align-left'); } }); $(document).ready(main);
Getting uptodate Versions of Jquery for Node.js
Using npm on Linux I find that I only get version 1.7 of JQuery. It is also not clear to me as to the version ofJQuery in Git jquery/jquery. Will we get updates on a regular basis (how far behind?) or is this project stalled at this version?
Setting custom shortcuts in jquery UI datepicker
Hey Guys, I got a huge problem, because of datepicker keyboard interaction. PAGE UP: Move to the previous month. PAGE DOWN: Move to the next month. CTRL + PAGE UP: Move to the previous year. CTRL + PAGE DOWN: Move to the next year. CTRL + HOME: Open the datepicker if closed. CTRL/COMMAND + HOME: Move to the current month. CTRL/COMMAND + LEFT: Move to the previous day. CTRL/COMMAND + RIGHT: Move to the next day. CTRL/COMMAND + UP: Move to the previous week. CTRL/COMMAND + DOWN: Move the next week.
Before and after with "img" and "p"...???
Hello! If I write text before and after "img" it appears in the same line, but if I use "p" instead, I get p text, befoe text and after text in 3 lines. How can I achiev to have before text and after text in the same line as p text? Many thanks!!! <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("#btn1").click(function(){ $("p").before("<b>Before</b>"); }); $("#btn2").click(function(){
remove() with more than 1 parameter
hello! Please, is it possible that method : remove() has moer then one parameter, sth like: <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("p").remove(".italic", "bold"); }); }); </script> </head> <body> <p>This is a paragraph in the div.</p> <p class="italic"><i>This is another paragraph in the div.</i></p> <p class="bold"><b>This is another paragraph
loading HTML form into jQuery window
I have an existing HTML form that uses PHP for content processing. I want to load this form into a jQuery popUp window, and allow users to post data to the server. Many of the pre-built jQuery modules support images and other content. But I haven't found a solution for an HTML form yet. Any help appreciated, --RKaye
Search Menu
Hello, I'm new to jQuery and I'm developing a web app for my job that will keep track of our equipment inventory. I would like the main search menu to consist of a series of HTML select elements, each of which would display different options depending on the options that are selected in the other elements. For example if the first select element, which we'll call "Asset Type", is set to "Desktop", then the next select element in the menu, which we'll call "Models", will display a list of desktop
Making a grid work in a tab
I purchased a html5 theme that I am customizing for my church website. It has two cool features: 1. A tab script that allows for multiple items to displayed on one page. 2. A grid that will allow me to display sermons in a series in a neat and orderly way. Both of these work well when used alone, but when I try to use the grid inside the tabs, no dice. I am a design guy and know very little about Javascript functions and need help. Here is what the developer, who has not got back with me said to
Why can I not trigger an input from checkbox label?
Hello, after three day of searching I still not know why I can not trigger an input field(for use of virtual keyboard) from a checkbox label. Can someone explain me what i am doing wrong? Html: <div> <label for="checkbox-0">I agree<input type="checkbox" name="checkbox-0" /></label> <div><input name="test" type="number" id="amount_checkbox-0"></input></div> </div> Script: $(function() { $('label').click(function() { labelID = $(this).attr('for'); alert($('#amount_'+labelID).attr("name"));
Cannot Download jQuery
I have to download jQuery for a school assignment and am unable to do it with any version. Attached below is the error I'm receiving. Also, what version is best for me to download? Thanks in advance!
Light box : tries to open PDF same like image
Dear All <script src="<?php echo PATH;?>javascript/jquery.lightbox.js"></script> <script> // Initiate Lightbox $(function() { $('.gallery a').lightbox(); }); </script> works fine for me refer http://www.himashreetours.com/Tour/2/1/ANDAMAN-TOUR-6-NIGHTS-7-DAYS- click on scrolling iamge displays the image in lightbox However when i click on PDf for download purpose when I click on it..... the program tries to show/open this as an image on screen and obviously fails how can I open this PDF
How do I convert this inline javascript to a function
I have several email addresses on each page of a site. I have an inline javascript function to obfuscate the address and prevent bot harvesting, how would I convert the inline to a single function? here's the inline <script type="text/javascript"> document.write("<n uers='znvygb:fhccbeg@urkare.pb.hx'>fhccbeg@urkare.pb.hx</n>".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<='Z'?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);})); </script> the 'fhccbeg@urkare.pb.hx' part in this example is
jQuery plugins with table and pagination
I'm using jQuery 2.x, I wonder if there's a plugin that involve less javascript code as possible when building a table filled with ajax call. Datatables.net has a good way to achieve this, but I suspect that works only with jQuery 1.x because I can't call the server side code with ajax. Any suggestion? Thank you
identify the child
Hello, sorry first, my english isn't the best and the problem to describe is not easy. I hope i can do. I have some tabels and every tablke has its own id. i have some rows in this table. In every row i have two radio-buttons. Now I need a function to find the line in the clicked radio. Sample: (is only a sample to describe what i need) an which CHILD is the radio-button clicked The reason why i need that is this i manipiulate the <input> fields at the row. with this $("#box-"+TypeId+" tbody tr:nth-child("+child+")
css or jquery and how?
Hi I want a menu like the site hookerfurniture.com Please help I do not know where to put
Fade In not working.
Hi, Why on the face of the earth this does nothing when pressing the button ? <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script> $("#btFadeIn").click(function () { $('PictureHolder').fadeIn('slow'); }); </script> </head> <body> <div id="PictureHolder" style="background-color:red;width:300px;height:200px;"
using stringify
I am trying to pass two arrays to a php page like this: var mainFilter = getAllMainCheckedCheckboxesVals(); var subFilter = getAllSubCheckedCheckboxesVals(); JSON.stringify(mainFilter); JSON.stringify(subFilter); $.ajax({ url: 'process.php', data: { mainFilter : mainFilter, subFilter : subFilter}, type: 'post',
hide images and release the space.
I have a lightbox gallery. Everything is fine but I wanted to make it filterable. I used a tutorial and ended up with this code: HTML: <ul id="filter"> <li class="current"><a href="#">All</a></li> <li><a href="#">Kitchens</a></li> <li><a href="#">Bathrooms</a></li> <li><a href="#">CAD</a></li> </ul> <script> jQuery(function () { jQuery.thumbGrid.transitions.slideLeft = {in: {x:"0%", opacity:0}, out: {x:"-100%", opacity:0}}; jQuery.thumbGrid.transitions.slideRight = {in: {x:"0%",
Hover img with id=?
<div id="something"> <img class="button" id="article-222" src="image.jpg"> <img class="button" id="article-212" src="image.jpg"> <img class="button" id="article-292" src="image.jpg"> </div> How to catch particular hovered image and to do something with it?
Superfish Menu - Parent items are unclickable (other top-level & children clickable)
Hi there, Im using a wordpress theme that has a bug which makes all Parent items that have Children unclickable. The issue is only specific to those parents, as top level items with no children are clickable and all children are also clickable too. The website is here , and its the responsive top menu Im referring to, with the issues occurring on mobile/tablet versions only (once the site's width is under 850px). I believe that menu on desktops/laptops uses the normal Wordpress menu system, not Superfish,
Misunderstanding Select input and firing an event on change of value
I'm trying to use jquery to change a dropdown value in SharePoint page and when the dropdown value is changed I want to fire another event. I can change the dropdown value using jquery but it does not fire the next event when it is changed. So i'm missing something. Any advice greatly appreciated. the fiddle is here: http://jsfiddle.net/vhabhsrosed/Ljkb2574/4/ the code example: //SET CODE TO FUNCTION WHEN ON COMMITTEE MEETING FORMS PAGE $(document).ready(function(){ var xAgenda = "Safety";
Debug Jquery
Hi I am new to JQuery and I have problem debugging it. I am trying to use alerts .In this case why bought alerts are fired and then the show function Thanks Any suggestions about debugging jquery will be greatly appreciated. alert( "Test1" ); $( ".divSlider #MainContentPlaceHolder_1" ).show(); alert( "Test2" );
Same Error
I know that recently I posted a similar error, but I changed almost all my code, and I started using a different program (NetBeans IDE 8.0.2). Here is my code: HTML: <!DOCTYPE html> <html lang="es"> <head> <title>Title</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"> <link rel="stylesheet" href="style.css"
Using Theme Roller
Hello all, first and foremost, I am extremely "wet behind the ears" when it comes to using JQuery UI but, I am trying to learn and figured this may be a good start. I am simply attempting to utilize a custom theme that I designed in Theme Roller. I'm not exactly sure how to go upon this. I created the theme and downloaded the .zip file. From there I do see the "jquery-ui.theme.css" file, however, when I open it, all I am seeing is the actual CSS code from the theme. I can't seem to locate the "http://code.jquery.com/ui/1.10.2/themes/dark-hive/jquery-ui.css"
Dialog Confirm
I installed my first JQuery plugin the dialog confirm box and it works only it doesn't look quite te same. I can't figure out how to adjust the height of the box. In the sample they use a style.css but there is no example: http://jqueryui.com/dialog/#modal-confirmation This is the box after I installed it: http://i1301.photobucket.com/albums/ag106/DanTheMan-NL/Capture_zps3579e5b7.jpg And I guess you already know now what I think is wrong. ;-) Any suggestions?
Help with Message Widget
Got a Div being refreshed every 5 seconds. The div has scrolling set to scroll so that user can scroll. I know how I can keep the scroll position after the div is refreshed ? $("#bottom").on("scroll", function()
{
$("#bottomv").html($("#bottom")[0].scrollTop);
});
$(function()
{
$("#bottom")[0].scrollTop = $("#bottom")[0].scrollHeight - $("#bottom").height();
}); Scenario 1) There is a textArea on this page, I want it that when a user clicks on the textbox, the scroll bar should automatically
How to get comma separated decimals to get calculated?
Hi I have a form with a field called "Areal" where I want to be able to enter comma separated decimals values to be calculated but I have no clue as to where or what to enter in the following piece of code in order to do so ... and at the same time get the result with comma separated values. I thought it was straight forward and easy to google, but I guess not :-S ... and with no jquery coding experience I am lost. <?php $user =& JFactory::getUser(); if($user->id) { echo '<script>jQuery(document).ready(function(){
how to find the ppi of an image using jquery
Maintain the below size or resolution for the images while uploading. splash screen sizes: 1242 x 2208 (@3x) for portrait 750 x 1334 (@2x) for portrait
Time In Time Out Application
Hi everyone, I just want to create a Time In Time Out Application using PHP, AJAX and jQuery. This page will automatically refresh its content everytime the database is updated. Can you help me out of this or give me some sample codes. I have a hard time dealing with AJAX and jQuery but I'm well-versed in PHP. Thanks.
Debugging techniques for JQuery
I am still a novice with javascript and jquery. I am developing code for a web site and the code is mildly complex, using HTML5, JSP, Javascript and Jquery. I have run into several problems when using JQuery so far. Some have been fairly easy to fix. Some not so easy. I find the debugging process to be fairly lengthy in time and was wondering if there are some techniques available that I am not aware of. My current techniques that I use, some more that others are: 1) Read the code 2) use alerts method
Using jQuery to make it work with a form
hello, can you help me to put this form in wp page? THX </div> <div id="trade_fancybox_form" class="fancybox_form"> <?php if(!isset($lwp_options['tradein_form_shortcode']) || empty($lwp_options['tradein_form_shortcode'])){ ?> <h3><?php _e("Trade-In", "listings"); ?></h3> <form name="trade_in" method="post" class="ajax_form"> <table class="left_table"> <tr> <td colspan="2"><h4><?php _e("Contact Information", "listings"); ?></h4></td>
jQuery ajax request returning nothing
function getSessionData(callback) { $.ajax({ url: 'URL Value', "type": "GET", dataType: "json", async: true, success: function (data) { callback(data); }, error: function (xhr, textStatus, error) { alert(xhr.statusText); alert(textStatus); alert(error); }, }); } I am making an android legacy android application, on the emulator the application works fine and the request goes through
JQuery (JavaScript) Syntax Error on line 1.
I have a user running Windows XP, with IE8, and I'm to trying to optimize his web site using JQuery. I have successfully implemented the following code that sorts a column of data by clicking on the specific column header (LN). Everything works fine and the data in the column is sorted and posted to the column in the correct order and "THEN" I get an error POPUP box that states I have a syntax error on line 1. Sample code: $("#LN").click( {parm:0},sortTable ); function sortTable(event)
Script transfered with MIME type text/plain
I'm receiving the following error in Chrome for my jQuery file: "Resource interpreted as Script but transferred with MIME type text/plain." This is the code in my html file: <script type="text/javascript" src="js/jquery-2.1.3.min"></script> <script type="text/javascript" src="js/index.js"></script> I'm not having any trouble with the js/index.js file. I found some information that said I needed to check my registry .js Content Type to make sure its data type was not "text/plain," and if it was
Next Page