change button color depending on text value, how??
I want to do the following (air code): $('input[type=submit]').val('Update') then set submit button color=red actual generated html looks like: <input class="btn btn-primary" value="Update" type="submit"> <input name="products_id[]" value="1" type="hidden"> if an anchor link has a span class containing 'btn' and its text value is 'Check Out' then set color=purple such as $("span:contains('Check Out')").css("color", "purple"); (adapted from jQuery docs, this tests if span contains that phrase??) actual
$.each/if comparison iteration problem
Im trying to iterate through an ajax response. Im receiving a json response with several rows of data. yadayadayada ... { "PDMOVE":[ {"SCCUST":"AAM440", "SCNAME":"A AMERICAN STORAGE", "SCADR1":"4400 MCGRATH", "SCCITY":"VENTURA", "SCSTAT":"CA", "SCZIPC":"", "SCCNTR":"3"} , {"SCCUST":"ABH952", "SCNAME":"A&B HONGDA GROUP INC.", "SCADR1":"9520 SANTA ANITA AVE", "SCCITY":"RANCHO CUCAMONGA", "SCSTAT":"CA", "SCZIPC":"91730", "SCCNTR":"2"} , ... ... ... The json is valid, it's been tested ... I want to
using jquery with xhr
Hi, Forgive me in advance for my bad english. I'm trying to put the jquery accordion in some pages of my web application, and I have a problem to use this accordion. I'm loading my pages using xhr in a div called "page" (<div id="page">). If I get this page directly, the accordion function, but if I load it from xhr, it doesn't work. how can I resolve this problem ? i'm using smarty for the template generator. I hope that someone could help me.
hover() trigger behavior in Internet Explorer 10
Hi, I'm pretty new at jQuery/javascript so please excuse if this is really stupid ... I'm trying to code a mouseover behaviour on a website where when the mouse enters an image, an overlay of text appears above the image, and persists until the mouse leaves the image. To achieve this, I've marked up a mouse catchment div that covers the entire image, and is greater in the stack order such that it is above both the image div and the overlay text div. Then, I've used the following to code the behavior
Designing a Modal
I am designing a modal and I am having issues with controlling click events. Let me first show a framework of my HTML code so I can better explain the problem <div class='modal-wrapper'> <div class='modal-whole'> <div class='modal-header'> <h1></h1> </div> <div class='modal-body'> <p></p> </div> <div class='modal-footer'> <a href="#">Close</a>
the contains function doesnt work for me please help!!!
so i been going at it for hours can you tell me where im messing up, im starting to think that the way im doing it its not supported by jquery no more this tutorials are from a year ago index.php <!doctype html> <html lang="eng"> <head> <meta charset="utf-8"> <title>wassup</title> <link rel="stylesheet" type="text/css" href="cs/style.css"> </head> <body> <p><input id="searchme" type="text" /></p> <ul id="caca"> <li>hey you</li> <li>fyck no</li> <li>poikl mn</li> <li>heiisds sdfafd</li>
BackgroundImage URL
Hi All, On my draggable stop event I want to get the positions (top and left) and the background image url of my div container which is being dragged. I can get the co-ordinates but not the url, any help please? Jiggy!
Jquery does not work?
here i write jquery in my asp.net forum but not working please suggest where is i'm wrong? <script type="text/javascript"> $(document).ready(function() { $('#ddlPaymentMethod').change(function(){ if($('#ddlPaymentMethod').val() == "") { $('#ddlService').prop("disabled", true); } else { $('#ddlService').prop("disabled", false); } }); $("#ddlService").change(function(){ if($('#ddlService').val() == "")
jquery works but this method doesnt.??
i was watching some tutorials from thenewboston on jquery and everything works on my notepadd++ and xampp server, the only thing is that this code right here doesnt work it is this video (3mins) that i cant do, it doesnt highlight the text like it shoud. im tired of rechecking for the last two hours,,i thought maybe the syntax is bad and someone here can help me https://www.youtube.com/watch?v=jIZFHjkUCrs&list=EC6B08BAA57B5C7810&index=24 $(document).ready(function() { @@@when document ready $('#searchme').keyup(function()
JQuery and ODATA web service
Hi! I have created a ODATA web service to get some data. It looks like this: namespace AdvaniaUtvService { // Start the service and browse to http://<machine_name>:<port>/Service1/help to view the service's generated help page // NOTE: By default, a new instance of the service is created for each call; change the InstanceContextMode to Single if you want // a single instance of the service to process all calls. [ServiceContract] [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
an AJAX returned function?
What I am trying to do with $id is get it returned from the clicked table row event function, grab the id and pass it to the delete.php page through AJAX GET in the url. I don't know if I can have the click event function inside the AJAX function like this? $.ajax( { var $id= $('.x').on( 'click', 'tr', function (e) { var id= $( this ).closest( 'tr' ).get(tr[id]); $(this).closest('tr').remove(); return id;} type:"GET",
$.each() not saving values
It's not often I ask a question myself! Please could someone sanity check my code before I report it as a bug. Is this a bug? I'm trying to alter the values of a custom object's properties, from within a $.each() loop. The full demo code is on jsfiddle:- http://jsfiddle.net/alano/96XDz/ var obj = { testA: "please change this", testB: "and change this too" }; function doReplace() { $.each(obj, function (index, value) { var newVal = value.replace("change", "done");
open page
Dear All Using PHP A record is displayed. and same can be deleted using JQUERY But after deleting the record i want to show next record JQUERY code to check whether a record is deleted $("#deleterecordy").click(function () { $('#searchdiv').hide(); $('#headerdiv').hide(1000); $('#selectheaderdiv').hide(1000); $('#showdetails').hide(1000); var url = "deleterecord.php" var data = { recordid:$('#recordid').val() }; $('#deleterecorddiv').load(url,data,function(data){
jQuery AJAX doesn't return XML with Internet Explorer 10
When called from within Internet Explorer 10, jQuery doesn't return a valid XML document object. What's going wrong? Here's the test code: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script type="text/javascript"> var url = "test.xml" $(function () { $.get(encodeURI(url), function (data) { data.setProperty("SelectionLanguage",
Load Event issue for dynamically added elements
I am trying to support load event for dynamically added elements to the DOM. so couple of years ago we used to use $(".myclass").livequery(function(){ }); and it used to work perfectly. Now $(".myclass").on("load",function(){}); // doesn't work apparently load event is not supported for .on() and .off(). what is the work around this issue, so simply add elements to the DOM, or even when the element is constructed for example ( $("<div class='myclass' />") ) an event gets fired and we catch it. is
Drag Drop Create New Object
Hi All, I know how to do the drag and drop. My problem is if I look in code behind I can't see any of the drop controls. I want to drag and drop blob images (pointers) on to a photo so I can put text to each blob. Blob 1 - This is the sun in the photo etc. Please any help, I have been googling for 5 days now but can't grasp how to do it. I also want to save the position of each dropped blob in database so I can recall them. I am very new to JQuery and Java so would appreciated any replies,
Validation for variable number of start and end dates
Hi, With two date fields in my form.Below validation works perfectly fine. $('#sDate').datepicker( {gotoCurrent: true, changeMonth: true, changeYear: true, dateFormat: 'dd-M-yy', yearRange: '1850:2050',maxDate:'0' , onSelect: function(selected) { $("#eDate").datepicker("option","minDate", selected); }}); $('#eDate').datepicker( {gotoCurrent: true, changeMonth: true, changeYear: true, dateFormat:
Uncaught ReferenceError: jQuery is not defined
Hello, In my joomla site, I use jquery to load and display a Live Help Messenger. All pages load and display the messenger fine, but one page doesn't. This page loads an iframe (a microsite with 5 menus). To open the microsite I type a url in address bar like this: www.mysite.com/menu1 or www.mysite.com/menu2. When I type the 1st url and navigate to all microsite's pages, everything is loaded without error but when I type the second url I get "Uncaught ReferenceError: jQuery is not defined", in every
Non center image
I'm trying to build a Photo Gallery in my blog and as you can see the big image is not center. http://500wonders.blogspot.com/ Anyone would have a clue why? .js files? .css? HTML? I can provide with code Thanks
Photo Gallery
I had a Photo Gallery in my blogger blog .css code, HTML in the post and the JQuery code. I have the JQuery in the following files: http://500wonders.biz.ly/js/jquery-1.3.2.js http://500wonders.biz.ly/js/jquery.galleriffic.js http://500wonders.biz.ly/js/jquery.opacityrollover.js The blog is: http://500wonders.blogspot.com/ It worked and without changing any code or doing anything stopped working. Here is a link to a threat opened when working: https://forum.jquery.com/topic/non-center-image This
How not to enter IE quirks mode?
Hello, Im trying to assign some css in jquery, I thought it wasnt working but I found out about "quirks mode" in IE. How can I prevent IE from entering quirks mode? Or put it in IE 9 mode ...(Why am I even having to ask this question?) Ive tried the <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3. rg/TR/xhtml1/DTD/xhtml1-transitional.dtd"> , I had to use that to fix a datepicker issue, but it didnt put it in IE 9 mode.
hover image switch
Wondering if I could have written this more efficiently. Three images. Hover one, the other two switch. <script> $(document).ready(function() { $(".imgc").hover(function(){ $(".imgr").hide(); $(".imga").hide(); },function(){ $(".imgr").show(); $(".imga").show(); }); $(".imgr").hover(function(){ $(".imgc").hide(); $(".imga").hide(); },function(){ $(".imgc").show(); $(".imga").show(); }); $(".imga").hover(function(){ $(".imgr").hide(); $(".imgc").hide();
Question on : PhP Form and a Standed Form
My Form which has Enter name and address ect is a PHP Vaildated form, And is on the same page as the datepicker with its own Validation. The Php form comes first then the datepicker comes last. I couldnt get both to work together on the same page, the php work's and vaildates the name & email address ect, but skipped the vaildated for the picker..is this because it goes off to the server and come's back after the checks. Or can you not have a Php Vaildation and Standed form vaildation running on
How do I select "this" item, followed by the next?
I have the following XSLT code referencing a SharePoint list which is adopting the ColorBox plugin. The issue I'm having is, I can click on each list item and it shows a new structure in the pop up (as seen in within the #inline_content). However, each item is displaying the same information rather than the unique information associated with the list item. <xsl:template name="filter-items"> <div class="contact-item"> <div class="something"> <a class="profile-popup" href="#inline_content">
How can I catch the completion action before success action in jquery ajax?
I want to do something immediately when the ajax request has response.And I want to do this before success action.This is my codes: $.ajaxSetup({ contentType: "application/x-www-form-urlencoded;charset=utf-8", complete: function(xhr){ alert("complete"); } }); function save(){ var frm = $("#frm").serialize(); $.post("<%=request.getContextPath()%>/user/saveUserInfo.action", frm, function(result){ alert(result); }); } But,the value of result is shown before complete function.
i have a problem while using datepicker and radio button
I am using date picker. i have to disable the image button if the user clicks on radio button and vice versa. i tried alot but i am not able to do it.. thanx in advance Regards, Amit
ratio lost the check when append new field
Hello i have a problem i have a dinamic table that send form data to a table the only problem that i see is when i work with ratio input the selection is remove in the other items $("#parentesconuevo").click( function(){ $('#table1').append('<tr><td></td><td></td><td></td><td></td><td></td><td></td><td><a href="#" class="delete">delete</a></td></tr>'); if ($('#estadoS').is(':checked')){ $('#table1 tr:last td:eq(3)').html('Si <input type="radio" name="estado[]" id="estadoS" value="1" checked class="rounded5"/><br/>No
html() doesn't escape special characters
Hi all I am using this code: $("#PrintAspirantsButton").click(function () { $("#innerHtml").val(base64_encode($(".OIMAppPrimaryAction").html())); }); because basically I need to get the html of a certain node into a forms variable. I base64-encode it first, though, but that is besides the point :-) My issue is that the html() function seems to be outputting strings like "jæger" instead of "jæger" which is actually in the HTML. So the html() function appears to disregard the encoding
rel nofollow
Hello! How to make external links "nofollow" with JQuery? I want to attribute "rel" add "nofollow" like this <a href="http://www.externalsite.com" rel="nofollow">do not follow</a> but my domain this may not apply <a href="http://www.mysite.com" rel="">yes, follow</a> Thank you!
Input field, how would I prevent 3 or more consecutive characters?
Using an Input field, how would I prevent 3 or more consecutive characters? Thanks var validator = $("#signupform").validate({ rules: { firstname: { required: true, minlength: 3, maxlength: 30 }, lastname: { required: true, minlength: 3, maxlength: 30 },
Jquery Auto Resize Images
Creating a web app. What jquery code can I use to allow users to resize images to fit required size? Much like how instagram and facebook asks users to adjust and resize image to fit.
jCarousel... wrap:"circular" hiccup
Hi everyone, I am trying to implement a circular wrap on my jCarousel, but there is a weird little hiccup I cannot seem to fix. I am showing two items at a time and when it reaches the end, it wraps to the first item HOWEVER the second item starts to lag and does not appear until the pause is over. Has anyone encountered this? Here is an example of my issue. It is four items and when it gets to the last one, the behavior occurs. http://www.rachelraynes.com/test.html Thanks! Rachel <script type="text/javascript">
coda slider jquery - hlelp
I'm find coda slider jquery like this web site. http://livedemo00.template-help.com/wt_41555/#!/page_home Anyone can help me.if you have any tutorial or code please give me. Thank you.
jQuery special event hoverintent isn’t working properly with `mouseleave` functions
I'm having difficulty getting the `jQuery` special event `hoverintent` to work with `mouseleave` functions. *(I’ve also tried substituting `mouseout` for `mouseleave`)* I need to utilize the same functionality so that the `mouseleave` event is only fired when the user's mouse has slowed down beneath the sensitivity threshold. I’ve included the script below, and have also uploaded a working example to http://click2fit.com/test_files/accordion_hoverintent.html $(function () { $(".accordion_close_leave").accordion({
increment div's value on keydown
Hi! I would like to increment the value of two divs by one each time a press the left or the right arrow button. It doesn't work, says [13:04:50.297] TypeError: this[0].innerHTML is undefined @ http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js:12 <div class="centered"> <span id='first'>0</span> <span id='second'>0</span> </div> <script> $(document).ready(function(){ $(document).keydown(function(key) { switch(parseInt(key.which,10))
Uncaught TypeError: Object #<Text> has no method 'getAttribute'
Ran into a curious situation that I don't know how to resolve. Rails app (3.2.8) but I don't think that is necessarily the issue. This previously worked with an earlier version of jquery but it did update when I updated recently. /*! * jQuery JavaScript Library v1.8.0 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ I have a drag and drop action which sends data to the application and indeed the database changes occur but the route back doesn't update the screen properly though
Textboxes already filled
I have a form which has a few textboxes and they have text in them already filled from a SQL table. I am using jQuery, to once all textboxes have at least 1 value inside them to enable the button (#edit). On this form, due to the textboxes already been filled, the button should be automatically enabled, however I have to edit one of the textboxes first before it enables it. $(function() { $('.fields).change(function(){ if (($('#title').val().length > 0) && ($('#name).val().length > 0) && ($('#email').val().length
can only check checkbox outside of the checkbox
Hi. I am having a strange issue with a checkbox on an ipad app that i have been given to fix. The only way i can check it is if i click slightly outside of the checkbox. i can remove the css stylesheets and the problem still occurs. The html5 code validates. When i removed the jquery import the problem went away. i tried updating jquery to the latest version but still no good. It may be something to do with jquery UI, which is also being used. However, i cannot remove this as the app doesn't display
Special event api
I'm little confused about special events. Is or isn't it an official jquery api for additional events? And if not, what is? There is only a note in documentation, most probably use the Ben Alman's article. But there are problematic parts, like teardown method argument described as array of namespaces which is something undetermined in real as you can see from ticket #11908. And what's this learning event extensions? Thanks in advance for an explanation, JH.
Set focus next element after form submit
Hi all, I want to set focus after submit form, so when i press enter on any textbox form submit and control will move on next element. my code here. html code: (index.html) <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script src="jquery-1.8.2.min.js"></script> <script src="movenext.js"></script> <title>Untitled Document</title> </head> <body> <form id="form1" name="form1" method="post" action=""> <table width="650" border="0" cellspacing="0" cellpadding="0">
Next Page