Validation Issue
I'm trying to validate a form using jQuery and for some reason even when a value is selected it is still coming up as empty. Can someone tell me what is wrong? function ValidateItem(item, useValLength, message, scrollTo, focus) { var aReturn; if (useValLength) { aReturn = $('#' + item).val().length > 0; } else aReturn = $('#' + item).length > 0; if (message && !aReturn) alert(message); if (scrollTo && !aReturn) ScrollToPosition(0, scrollTo); if (focus && !aReturn) { $('#' + item).focus(); ScrollToElement(item); }
Convenient approach to dynamically create html without an template engine ?
Hi, is there a way to dynamically create html without an template engine ? Something more copnvenient that this: http://jsfiddle.net/daslicht/zEW3e/ Just Curious :)
Accessing secured webservices thows unauthorized 401 error code.
There is a webservice located at the following url ( Please bear in mind that I have no access to change them, I have to live with it) http://localhost:8080/mywebservices/wsdl?targetURI=testread But these webservices require authentication when accessed. i.e when I open the url directly it asks me for username and password, and when I provide them, it let's me see the WSDL. I know it is a soap webservice., and I am providing the soap request message, but how do I provide the credentials as part
Peroidic callbacks using JQuery $.ajax and a web service to update progess on web client?
Hi, I'm making the following call to a WCF web service using JQuery ajax. This works but I was wondering if there is a way that you can alert the client with a callback function that certain points of the long process are complete instead of waiting for the success method to be called at the end. Example: "Step 1 complete" "Step 2 complete" "Step 3 processing" Some suggestions I came across are: 1.) you could poll the process periodically on set intervals to check the progress or 2.) break
Jquery: Use of attributes' specified attribute is deprecated. It always returns true
I have collection of select elements, when I change value of one select elements for first time this function dont work it works the second time I change value and in console I have jQuery code: $(document).ready(function () { var collection = $('select.ddlJ'); console.log(collection); for (var element in collection) { $(element).change(function () { $('select.ddlJ').change(function (e) { $(this).parent().parent().find('td:last').prev().find('span').html(
Layout question with dynamically-changing widths
I tried to accomplish the following task in CSS, but I don't think CSS can do it alone. It looks to me like a jQuery candidate, but I thought I'd check for ideas here... I have a header DIV at the top of a website (currently in DEV environment). It looks like: <div id="container"> <div id="left">logo</div> <div id="center">fixed search area</div> <div id="right">Variable length text</div> </div> Here's what I'm trying to accomplish: 1) I want the "center" DIV to be
Jquery 1.4.2 Form submit event handler is firing after form submit in IE 7/8
I am facing issue in form submit event handler. here is my code I am using Jquery 1.4.2 <FORM id="mysearchform" method="get" action="http://www.abc.com/results.aspx?q=" target=_blank sizcache="1694" sizset="0" jQuery1347023310528="3"> <DIV class="search"> <span><span> <LABEL class=hide for=q>Search:</LABEL> <INPUT accessKey=S id="a" class="abc" name="a" maxLength="50" value="Images" size=69 type="search" autocomplete="off" selectionStart="0" jQuery1347023310528="108"> <INPUT style="WIDTH: 185px;
how do I
Hi Everyone, First Thanks for your time! I'm using the following script how would I change it to make a PHP program execute on the server when the submit button is clicked? Sorry new to Jquery... still reading and learning. <head> <script type="text/javascript" src="http://www.google.com/jsapi"></script> <script> google.load("jquery", "1.5"); </script> <script type="text/javascript" src="jquery.multipage.js"></script> <link rel="stylesheet" href="jquery.multipage.css" /> <script type="text/javascript">
Update the quantity value in a master detail structure
hi, I´m trying to create some basic master-detail structure, and I found a problem. In my structure there´s a button called add to the sale list (adicionar a lista de venda, it´s written in portuguese), and when I click in this button I add a new row in the table, so in this table I got a column called quantity (quantidade it´s written in portuguese) and I want to update the quantity of the product when I click in the icon that´s in the right side of the text. The problem is that only the quantity
looking for sidebar/topbar plugin
Hello all sorry for the mybe not relating post , but i need some direction on where to find java script like this one , i mean the sidebar /fading on mouse over script . here : http://shinychang.blogspot.co.il/
same jquery code works on one domain but not another
Hi -- I can't figure this out for the life of me. Trying to implement someone's simple drop-down menu code. I can't get it to work on the site I'm working on: http://yesonb1.com/ddtest6.php But the code works fine here: http://cheshiredave.com/ddtest1.php The code is exactly the same. I've tried several different approaches to noConflict, and that doesn't appear to be the issue. This has plagued me for many hours today. Any ideas? PS: I'm really sorry the source code on the broken site has no formatting.
Image Carousel
Hi I am trying to implement the image carousel for mobile website. Can any one suggest me how to implement it?? Thanks
Changing Attributes in .load Content
Hello, Currently I am loading some HTML from a text file so that I can display it within a DIV. This content is based on different link ID's depending on the link. Currently I am able to get the template to load correctly but am unable to change the value of the #paramName attribute called value. Any help would be much appropriated! jQuery Code $(document).ready(function(){ $(".leaf").click(function(){ var currentReport = $(this).attr('id'); $("#dropHere").load('links/template.txt'); $("#paramName").attr("value",
[Help] Javascript To jQuery Convert
If anyone can help me change the javascript code below into jQuery code? I'm having trouble changing the code. function addListItem() { var listItem, container, dataList = document.getElementById('dataList'); // Create our list item listItem = document.createElement('div'); listItem.setAttribute('data-bb-type', 'item'); listItem.setAttribute('data-bb-img', 'images/icons/icon11.png'); listItem.setAttribute('data-bb-title', 'Title '); listItem.innerHTML
Using Checkboxes in SharePoint to Hide/Show Fields
Hello, I have the functionality working partially the way I want it. Currently when I click on a checkbox, it will hide or show a field using the toggle function. However, every checkbox on the page will hide/show the same field. I identify the control with the field title, but every other check box even when not identified can still activate this function. In this case, when you click the root cause analysis checkbox, it toggles the Root cause anaylsis date field hidden or displayed. <script
Multiple OR conditions
Hi Guys, I am really new to jquery, can someone please answer this basic question for me how do I do an or condition in Jquery, I want to check if one of these two divs have these classes This is what I have tried if ($('Find-Block').hasClass('find-block-on') || $('Add-Block').hasClass('add-block-on')) { Any help will be very much appreciated Thanks in advanced
Changing the background color of specific blog
Hi there, Can anyone tell me how to change the background color of specific blog? I want to change the background color of this blog 'Righteous Kill' Director Jon Avnet Open To Paying Actors On His Web Series Close To Cable TV Rates" Here is my the site Best Wishes Bomzon
why do first() return a array?
for checkbox like: <input type="checkbox" id="selectAll"/> when I use $("selectAll") or $("selectAll :first") or $("selectAll").first(), result is [<input type="checkbox" id="selectAll"/>] but for $("selectAll") [0], result is <input type="checkbox" id="selectAll"/> so what is the correct usage of ":first" and "first()"?
how to add ajax request in a queue in jquery
i want to add ajax request in a queue when this process is complete after that fire all queue request one by one in an synchronised manner......
jQuery and Query Notification
Hi, Using Service Broker and SqlDependency in ASP .NET I'm going to refresh parts of data section of my page when any change happens to the underlying table applied by other users. Please tell me how can I access to OnChanged event of SqlDependency object in jQuery.
Load external page into article with JQuery
Hi all, I've been reading numerous of posts of using JQuery to load an external URL into a page. I tried many solutions but till now nothing has worked for me. I'm new to JQuery and would love to know how I can make this happen. The code I've implemented now is: <script type="text/javascript" src="<?php echo $templateUrl; ?>/script.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('#test').load('http://www.test.com', '', function(response, status, xhr) {
$.post menu building problem
Hello I'm very new in jquery I'm trying to build multi level menu it is working but kind of slow can you please advise me what i'm doing wrong thanks in advance (function(){ $('li a').on('click',function(e){ var href = $(this).attr('href'); //alert(href); $.post('child.php',{ id : href } , function(data) { if (data){ $('body').html(data).on('click',function(e){ e.preventDefault(); $('li a').on('click',function(e) { var href = $(this).attr('href'); e.preventDefault(); $.post('child.php',{ id : href
jQuery and svg files
Hi all, I am developing a website and want to implement svg files to help in regards to retina displays, but want a fall back png file as a back up. This is the html/js; <div id="band"> </div> <!--band--> <script> $(document).ready(function() { if (Modernizr.inlinesvg) { //SVG. $('#band').html('<img src="barbGradient.svg" />'); } else { //No SVG. $('#band').html('<img src="barbGradient.png"
Is jQuery / Java-Script secure?
Hi Is jQuery / Java-Script secure?
toggle menu's child div color change on click and keep after refresh.
Hello , I made one menu in which there is three step. First Main Div(Sports) then Child div(Country) and one more (League.) In this when I click on Child div(Country) so that will change it's color and then when I refresh my page so that will keep that color. I get that color when I click but when I refresh that Page so That Div(Sports) contain that color and child div lost that color. I made one demo which is here. box2.click(function() { $jq(this).next(widget2).slideToggle(200);
Cannot get $.post variable in ASP page (but can get in PHP page)
Dear All, ** Attached with my testing source code : JQuery ver 1.8 ** I have a problem of making use of $.post command to pass variable "queryString" to an ASP page for further process. My existing PHP version (Working!!!) =========================== index.htm >> $.post("rpc.php", {queryString: ""+inputString+""}, function(data){ This version is working and I can pass the "queryString" value to a PHP page ( rpc.php ), I can get this value by $_POST[queryString] function call (in rpc.php).
PHP jQuery and AJAX, seamlessy integrated
I've created a library that create a seamless connection between jQuery and PHP, through AJAX json responses. It's highly flexible, and can fit any type of app or website. http://phery-php-ajax.net/ you may follow the github account too http://github.com/pocesar/phery. Its also available on http://packgist.org/packages/phery/phery
How can I properly use .slideToggle in this situation?
I'm currently using slideToggle on my FAQs page, except the way I have it written is very redundant. I just started with JQuery yesterday, so I'm not really sure how to correct this. I'll post an example for you: This is the HTML: <span class="toggler" id="toggle1">This is a faq.</span> <div class="faq" id="faq1"> ytoosfdsf<br/> ytoosfdsf<br/> </div> <span class="toggler" id="toggle2">This is a faq.</span> <div class="faq" id="faq2"> ytoosfdsf<br/> ytoosfdsf<br/> </div> This is my script I'm currently
Best performance for 4-20 images rotated at the same time?
I want to build a circular menu, with bouncing bubble-like elements all positioned around a central item, kind of prezi editor navigation, but with faces. There's probably some existing plugin but I haven't found any yet, so I'll build it. Now, since every new item added or rollovered I want it to displace the others along the circle, I was thinking of rotating the items with simple css positioning, rather than calculated position around a path, because at some point all the images would moving to
Stipping more than one table in a page
Hello I am trying to strip my tables using jquery while selecting the even rows (tr:even) and giving it a class with a different background. The page has more than one table which should be stripped. The problem that all the tables are stripped but as if they are one table. I mean that the odd or even counting continues from the first table to the second one. Is it a usual behavior?! can anyone help me to make it deal with every table separately (start counting the odd or even for each table separately)?
swf in iframe and mousewheel
hi there, I have a little problem to understand some function i js. I don't know what I must to write in the <script> to disable mouse wheel scrolling the whole page when I want to zoom in/out on a panorama in a swf file. Of course I need to disable for all browsers, now I'm working on FF I tried this: <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script type="text/javascript" charset="utf-8"> google.load("jquery", "1.4.2"); </script> <script type="text/javascript">
Simple Photo Manager & Ajax - Problem :(
Hey guys, I successfully copied the "Simple Photo Manager" to my page. (http://jqueryui.com/demos/droppable/#photo-manager) I want to manage many pictures in different categories. What i want to do: Type in a inputbox the name of a category. Click on a search-button left of the inputbox. Clicking on the button will send an ajax request to my server. In my PHP-script i find all database entires (pictures) linked to the category name. Then i want to print out all pictures in the format that the "Simple
data- attribute in a click event?
I have a button defined like this: <input type="button" class="add-fav-button" data-location="Canada" /> So then I have a click event in which I want to read in that data value document).ready(function () { $(".add-fav-button").click(function () { var location = $(this).data("location"); }); }); ...but the data item evaluates to "undefined" Am I doing this wrong? Thanks, Steve
How to keep this going
I am trying to get this slider to continue to slide in the chosen direction based on the hover state. I want it to continue to scroll as long as button is hovered over instead of 1 slide when fist hovered. I think I need to use onmouseover but am unsure of how or where to implement it. here is the fiddle of what I have thus far. http://jsfiddle.net/jeffhalligan/FbBvu/ thank you all in advance Jeff
IE7 preventDefault() not working on skip links
I currently have skip links that jump to the div id's and was using e.preventDefault() to stop the url from changing when jumping to the element but in IE7 or IE8 it doesn't work at all using e.preventDefault() and if I take it out the url changes to the div the anchor tag contains reference to. Is their any fix or way around this? Here is the code $('body').delegate('a.skiplink-accessible-text', 'click', function (e) { //e.preventDefault(); if(!$.browser.msie){ e.preventDefault(); } var jumpTo =
Create Json as input to jQuery DataTables
Hello, I'm attempting to use the "aaData" property of jquery DataTables plugin, but having a problem rendering my table when I pass it a Json formatted variable. My table does exists in the Html section of the page with id="pftable" , so now I just need to call DataTables like this: $('#pftable').dataTable() with the use of the "aaData" property. It works as follows, but with only one record. I can't however figure out how to ADD to the JsonTest variable : Copy code var JsonTest = { "aaData":
Issues with multiply li items being displayed
Hello, I currently have 6 list items, each with their own bit of text. I want it so when you hover one of the A tag images it will display the related text. The issue I am having is all of the related texts are being displayed under every li no matter which one I hover. Now I understand why it is happening, just not how to fix it. I will show you my failed code. $(function() { $('ul#portfolio li a').hover( function(){ $('ul#portfolio li').find('h4').css('display', 'block'); }, function(){
Source URL for "latest" version
Hi guys, So is the "latest" link (at http://code.jquery.com/jquery-latest.min.js) deprecated now? Because I see that it is at v1.8.0 where http://code.jquery.com/jquery.min.js is at v1.8.1 ! Do you support / recommend this idea of linking to "latest" on a CDN? If so, which URL is the best one to use? Or do you recommend linking to specific versions? It's odd that the download page doesn't mention the above two links when clearly they seem to be operational and useful.
Hello. I need help to function in Internet Explorer
This code: http://jsfiddle.net/biof/geuX6/ works for Chrome, Mozilla ... but I need help please to work in Internet Explorer Detail: $(document).ready(function () { $.each({ nombre:'Nombre', apellido:'Apellido', razon:'Razón Social' }, function(key,val){$('.datos_pers').append('<a class="'+key+'_tip">'+val, '<span class="'+key+'_arrow">▼'); var tip_datos = $('a.'+key+'_tip'+',span.'+key+'_arrow'); $('input.'+key).hover(function(){ tip_datos.toggle(); }); }); }); MIKEPIANIST
Using jQuery to post credentials to a shopping cart and opening a modal window
Is it possible using jQuery to post the login credentials to an external shopping cart and have the external website's shopping cart display in a modal window to the user?
Next Page