How to remove Tag name css from jquery?
Hi, For example i add css like this: table, thead, tbody, th, td, tr { display: block; } and I want to remove when my page go on responsive so how to remove this table tag css from Jquery? Thanks Chetan
jQuery using if else with mouseover
Hi there, i am quite new here and searching for help! Im trying to have a larger header while the site is scrolled to the top AND when there is mouseover. The first part of the code is copied by a blog, the second part is written by me and it doesn t work out at all! Please help me! Thanks! $(function(){ $('#header').data('size','big'); }); $(window).scroll(function(){ if($(document).scrollTop() > 0) { if($('#header').data('size') == 'big') { $('#header').data('size','small');
Input character field right align when loose focus
Can you on a Input character field right align when loose focus with jQuery ajax? I can't find a example. James James R. Martin J. Martin Associates
How to Add values from checkboxes
Hello Everyone, I am trying to sum the values from the selected checkboxes ... But so far what i am getting is like 2,3...what i want is 5....Can anybody help me out to get this logic please. Thanks!!!! <html> <head> <title>jQuery With Example</title> <script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $('.btnGetSelectedValue').click( function(){ var chkId = ''; $('.chkNumber:checked').each(function()
Image LOAD and ERROR events are not fired depending the browser in use
I've a very strange problem making work a preloader. I've created a simple preloader for my site that claculates thew status of images load and show a progress bar. With firefox all works fine, while in Chrome and IE some events seems not fired... The site contains 16 image, with Chrome only 15 are calculated (both between success and errors), while on IE only 5! This is the code: $(document).ready(function() { .... var imgsNumb = $("img").length; var doProgress=function(){ lodedSize++;
How to select cloest td value?
here is the code http://jsfiddle.net/boajay/8RCTT/ i want to select the value (test1),any one know how to do? thx
jquery get value from drop down
how to get values from one drop down list to another drop down when check box is clicked eg: if state drop down is in Current Address and when Check box is clicked Address is Same as Above it should display State name Same as Current Address in Permanent Address
jquery .each() within a json array
Hi! From the server side, PHP sends such a json object: {"status":1,"recId":"PL-17534","collectionDate":"08-04-2014","collectorsName":"asdf","donorsName":"","sciName":"asdf","family":"asdf","comName":"asdf","variety":"","area":"asdf","photoFiles":["1.jpg","internet.jpg"]} So i want to change the html content of an element , by customizing the contents of json object in the photoFiles array. I tried something like this but doesn't seem to work $('#photosTab').html(function(){ $.each(json.photoFiles,
audio works in IE9 but not IE11
I have some jquery code that calls a function called playSound, which plays a sound file when a dialog box opens. The sound file plays in firefox but not in IE11. It even plays in IE9. Does IE11 require some specific programming? I'm using jquery-1.8.3.min.js function playSound(soundfile){ $('#dummy').html("<audio autoplay='autoplay'><source src='" + soundfile + "wav' type='audio/wav' /><source src='" + soundfile + "mp3' type='audio/mp3' />Audio tag not supported.</audio>"); } playSound("media/alert.");
Ajax success value to parent function
Hi I am trying to get the Ajax function return values. <script type = "text/javascript"> function GetString(key) { alert(key); var keyValue = ""; $.ajax({ type: "POST", url: "ajax.aspx/GetString", data: '{key: "' + key + '" }', contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { keyValue = response.d; alert(keyValue); }, failure: function (response) { alert(response.d); } }); return keyValue; } </script> <script type = "text/javascript"> function Getdata(key)
Make a cross domain Post with credentials and a callback
I'm trying to Post some variables Cross Domain using jquery's ajax method. The user's credentials must be accessible on the receiving end, and there must be a callback (containing a redirect) that doesn't fire until the post is "done". With the traditional callbacks basically getting ignored, this synchronous approach looked promising as it essentially "waits" until the post is finished. But, while this works perfectly in Chrome, it fails in FF And, naturally nothing works in IE, including the passing
How to prevent double click change state on Menu?
I have a navigation tab which on click adds a class, say "active". The problem is when i re-click on "active" it goes back to "in-active" state. Can some one help me here. Link to JSfiddle: http://jsfiddle.net/EGR65/ The script goes like this : <script>(function($){ $(document).ready(function() { $('#yolloSwag a').click(function(){ var x69_Ownage = $(this).find('.showDropDown_X69').toggleClass('active_X69Arrow'); $('.showDropDown_X69').not(x69_Ownage).removeClass('active_X69Arrow'); var active99
Is it possible to define Offset value for scrollTop?
I have the following script, <script> $(document).ready(function(){ $('#yolloSwag a').click(function(){ $('html, body').animate({scrollTop: $('#Dailyoffers_X69').offset().top}, 999, "easeInOutQuad" ); return false;}); }); </script> This perfectly works fine and scrolls to the div#Dailyoffers_X69. But I was wondering if it is possible to define the offset value relative to the div#Dailyoffers_X69, say +-10px etc.
values comparations
I have two values and I need to compare both, well I have this code but when I do something like this the code doesn't do anything in the if part. var speechtext = $("#speech").val(); speechtext = speechtext.replace(/ /g, ''); var cedula_2 = new String(speechtext); var elements = document.getElementsByClassName("index"); for (var i = 0; i < elements.length; i++) { var prueba = elements[i].innerHTML.replace('<span id="MainContent_dt_estudiantes_lblcedula_', ''); prueba
Loop through DIV storing REST Values
Hi all, I have created a div to store values from a REST call as follows: $("#projectSiteVariables").data({ "projectTitle": value.Title, "projectTitleID": value.SiteTitleID, "projectActiveTitleID": value.ActiveSiteTitleID, "projectArchivedTitleID": value.ArchivedSiteTitleID, "projectTypeID": value.ProjectTypeID, "projectYear": value.Year, "projectSCURL": value.SiteCollectionURL
Help add more 'if' to code
Hello My code checks the username entered in a PHP file. The jQuery then displays if the username is taken or not. I have added code to the PHP file to also check if the username is below 3 characters or over 16 characters. How do I add another if within this code to display the correct result? I know the code will be if(d=='under'){ $("#usernamemessage").html("Username not long enough"); } But don't know how to implement it into the exsisting code. Thanks <input type="text" id="txtusername">
Toggle or Mouse Event Img size
I have images inside a div with a class, that I want to resize on mouseenter, go back to size at mouseleave. For some reason I cant get it to work. Any thoughts of what I'm doing wrong? I also tried Toggle and that wouldn't work either. Thanks! <script> $(function() { $(".single_entry img").animate({ width: 100}, 500); }); $(".single_entry img") .mouseenter(function() { $(this).animate({ width: 300
Event.keyCode always return 'undefined' in .on('input')
Hello guys, I was wondering to create a ticket to report a bug, but I read that I need ask here first, so here I'm. I have a specific problem in the startup I'm working on that is solved by the following jQuery method: .on('input', function(){ }); The 'input' event trigger every action inside an input or textarea (copy, paste, focus, keyup [I think]). The thing is: I didn't want an alternative to this method, I already solved my problem using a 'quick fix', I just want know why the following
fading stopped working locally
Hi all I am developing a site and for the life of me I cannot see why jquery fading or sliding will not work on my site (which I have used many times before in the past on other sites). Take this example: $("#loginform").fadeTo('slow', 0, function() { $('#loginform').remove(); $("#forgotpassword").fadeIn("slow"); }); Now, all that happens when I click a link to trigger that code, the #loginform disapppears without fading out and the #forgotpassword appears
Enable Last two image buttons on the <li> of <ui> using Jquery
Hi i am working on asp.net 4.5 + Jquery Here is my code: If you could see my code i am using imagebutton on the repaeter. Is it possible to enable the last two image buttons and disable rest of all the image buttons using Jquery? any suggestion or sample please I did try with the below code and it didn't helping me to achieve: <script type='text/javascript'> $(function () { $('#mycarousel li#imgcontent').last().attr('enabled', 'enabled'); }); </script> The version of Jquery what
is :hover, different result using mouseleave and mousemove
Hi, look at this example page http://www.gametalking.tk/provaIsHover.php (i'm using jquery/2.0.0) I need to show the red box hovering the black one, and hide the red leaving th black but ONLY if the mouse is not positioned on the red It's less convoluted than it might appear, imagine a drop down menu system. Anyway the problem is that the result of var isHovered = !!$('#box2').filter(":hover").length; is different depending on whether it is positioned insiede the mouseleave event or inside the mousemove...
Private member access in prototype pattern
pattern - accessing private members from prototype methods http://arto8.site11.com/ArtoJS/prototype-private-access.php
Need help show/hide input field using $.post
Hey guys. I have been racking my brains out to get this small function to work for the past 2 days. I tried every single thing I can possible think of and it still isn't working!! :( What I'm trying to do, is show an input field if a php property($is_delivery) is set to true. Initially it is set to false. When the drop down option is set to "Delivery" an ajax post needs to set it to true and display the text field. Also FYI. If you guys are wondering why can't I just use show/hide... It because
jquery not recognising new svg instance (loaded from ajax)
My project revolves around an interactive svg map. When i click a region.. ajax updates the container div with a new svg map. All looks good. My current task is to update a secondary div with the name of the current hovered svg path (region) of the current map. This works completely fine until i click a region and ajax updates the map to a new map. The secondary div stops updating and stays frozen on the last piece of hovered data. E.g. the jqery code that handles this task stops working, but the
Chrome App doesn't execute jQuery
I've encountered a strange problem with my chrome app i'm developing at the moment. I want to use the "knob" extension to use it for a alarm-clock slider (to set the time) This wouldn't be a really difficult matter, wouldn't it be for the restrictions and strange issues found while programming a chrome app. In my index.html file I included the jquery library and the knob extension. And that is where the problems started. Somehow, my scripts only can use the Id's of elements that are above them. So
Text out of sync with fadeslideshow
My question is twofold. I have a jQuery fadeslideshow which displays a caption along with the image. P1. I cannot seem to get the text to display below the image. Anytime I attempt to do so, it is clipped. I know it is getting clipped because I have padded it down to the bottom of the image to where it actually clipped. It seems anything I move outside of the height/width of the slideshow is clipped, except the control buttons which are absolute positioned. Q1: How d I display text outside of
unable to select element by id
I have the strangest error, I'm running jquery-2.1.0.min.js for some reason I can't animate an element when its selected by id. $(document).ready(function(){ $("#sddm li").click(function(){ $("#acuronlogo").animate({left:'250px'}); }); }); other functions such as .hide() will do work $(document).ready(function(){ $("#sddm li").click(function(){ $("#acuronlogo").hide(); }); }); .animate() is functional when I animate selecting by div $(document).ready(function(){ $("#sddm li").click(function(){
Ajax response successful but is triggering the error function
Hey guys, I have this ajax call: $.ajax({ url: baseUrl + "/concerts", type: type, contentType: "application/json", dataType: "json", data: JSON.stringify(jsonConcert), async: false, crossDomain: true, success:function(result) { concerts = data; }, error: function(result){ alert("Error saving concert"); } }); This is the jsonConcert object: Object {additionalInfo: "Christian Rock", authorId: 0, date:
how to store select value for php variable
<select name="status" id='status'> <option value=''>--Select--</option> <option value='Approve'>Approve</option> <option value='Reject'>Reject</option> <option value='Pending'>Pending</option> </select> $(document).ready(function(){ $('select').on('change',function () { //$('select').change(function () { var statusVal = $(this).val(); var job_id = $(this).prop('id'); alert(job_id); /* $.ajax({ type: "POST",
Finding out the maximum scrollTop of a div...
I have a DIV that scrolls. It's dimensions are: #scrollDiv { width: 800px; height: 400px; max-height: 400px; min-height: 400px; overflow: scroll; margin-left: 10px; margin-right: 10px; padding: 10px; } Suppose I fill it with a lot of content, so that vertical scrolling is needed to see all of it. So for instance, I take a scrollHeight() of the div, and it gives me 3250. I would assume that the maximum scrollTop I could get would
document.myform.action ... Won't Pass Variable
I am trying to pass the var delId to AccountDelete.html. It will not pass successfully. Appreciate any help to fix this!!! ======================= Code which passes delId: function OnSubmitForm() { var Id=<?php echo $rowcopyId; ?>; if(document.pressed == 'Go Back') { document.myform.action ="AccountsFrontEnd.php"; } else if(document.pressed == 'Delete This Account') { alert('AccountDelete.html?delId='+Id); THIS SHOWS OK. (Id=111) document.myform.action='AccountDelete.html?delId='+Id;
Toggle between two button text and functions on click event with jquery
I am using jQuery to sort my website content Alphabetically or by Most Recent, what I put up so far is working great, but I want a little more from it. On first click I want my Alphabetically button to sort them accordingly but at the same time, the text to change to Random and on second click to sort them randomly and change the text back to Alphabetically (toggle between the two on click event). And with the button that sorts them Most Recent, the same thing like the other button but to change
Uncaught ReferenceError: jQuery is not defined
a module isn't displaying what it should, www.southwalesda.org.uk
how to do one select tag select second select tag load....
how to do one select tag select second select tag load....
Drag and drop a file on a hidden <div>
I would like to implement drag and drop functionality for uploading files same as in google docs. I have been trying to work out this functionality but all my efforts are in vain. Initially the <div> on which a file has to be dropped should be hidden. When a file is dragged over that <div> it should be visible. I am not able to achieve this functionality. I can do rest of functionality i.e., uploading a file after it has been dropped in the div. Any help will be appreciated.
how to redirect the page from login.php to index.php after login ussing the .post ajax function in php
How can i redirect it to index page after the data has php loggedin page has succesfully process the form and this is the form in self
how to dynamically add collapsible set with json return data?
Hi, I'm trying to add collapsible set with json return data, but for whatever reason the result is look like this. Please give me some advise on how to fix it~~ Thanks Kevin Here is my code <div data-role="content" align="center"> <label for="search-basic">Search Input:</label> <input type="search" name="search" placeholder="Book Title, Author, or ISBN#" id="searchkeyword" value="" /> <input type="button" id="search" value="Search" /> <div data-role="collapsible-set" id="result"></div>
Jquery hide/show divs
Hi there. I'm using the following code and desperately wondering how to get the initial box to display on page load rather than when someone clicks on a menu link. Is there a simpler way to do this? <script type="text/javascript"> $(function() { var $menu = $('.menu'), $menuItems = $menu.children('a'), $mbWrapper = $('#content_wrapper'), $mbClose = $mbWrapper.children('.close'), $mbContentItems = $mbWrapper.children('.content'), $mbContentInnerItems= $mbContentItems.children('.content_inner'); $mbPattern
using jQuery ajax to populate input field with results of a jQuery
I have and TRANS. CODE in my HTML: [HTML] <tr> <td>TRANS. CODE:</td> <td> <input id="TCODE" type="text" name="TCODE" size="3" maxlength="3" value="$TCODE" onblur="setStyleBlur(this.id);" onfocus="setStyleFocus(this.id);" /> <div style="display: inline;" id="TABCDES"> <span><b><font size="35" color="$color">$TABCDES</b></font></span></div><br> ADJ/CN DESCRIPTION:
Menu effect when clicked
i have a website like this http://firdaus.jones.dk/webku/personal.html# when i click a menu it will scroll to down, but when it scrolling to down it 's have no a transition duration how to set up a transition duration effect.. thanks :)
Next Page