Change row color in html table
Hi, I need your help because I would like to change row color when input text is = 1 I'v tryied this, but not working: $("#mioTR").keyup(function() { $('input[name^="attivo"]').toggleClass('disabilitato', parseInt($(this).val(), 10) < 2); }).keyup(); this is my table; <table> <tr id="mioTR" > <td><?php echo $ind; ?></td> <td align="left"><?php echo $row_docenti['cognome'] ?></td> <td
Web2.0 Site Search Function with Jquery
Dear community friends, I was working on a banking project, where i needed a site search. The search function must be something similar to freelancer search. When user search for freelancers it will show the matches quickly passing below the loading image. Which gives a rich and interactive look to the application. I am personally very much impressed by the function. I am done something similar to this. but i don't know how to get that data passing effect. When user search for a branch code or ifsc
Jquery resize duplicating code ?
Hello. I am having trouble trying to set a height with resize() because every time i resize the screen it adds another svg. I can see why its doing it. It is adding more because it is creating the svg inside the packagesvg() which is inside the $(window).resize(). but I can't find a way to fix it? Thanks This is the code: The JS file: function packagesvg() { var w = $('.pillar').outerWidth(); var h = $('.pillar').outerHeight(); var paper = Raphael("buyingSvg"); paper.setViewBox(0,0,w,h,true);
Jquery didnt fired on button click event
I used the following code... I want an aler msg on button click...But it doesnt work.. help me to find out the mistake...Iam Biginner I used the following........ <script type="text/javascript"> $("#Button1").click(function() { alert("hi"); }); </script> <asp:Button ID="Button1" runat="server" Text="Button" />
How to avoid repeating / shorten my code?
Presently i have this to animate my scroll, <script> $(document).ready(function() { var navX1 = $('li.x32_01 a'), navX2 = $('li.x32_02 a'), navX3 = $('li.x32_03 a'), navX4 = $('li.x32_04 a'); navX5 = $('li.x32_05 a'); navX6 = $('li.x32_06 a'); navX1.click(function(){ $('html, body').animate( {scrollTop: $('#intro').offset().top - 50 }, 1700, "swing" ); return false; }); navX2.click(function(){ $('html, body').animate( {scrollTop: $('#second').offset().top - 50 }, 1700, "swing" ); return false;
border-collapse:collapse set border-top-width set to 0px or 0.5px
Hi, I think this is all ready reported but i cant found a sollution or reason why this happend. My problem is as followed. I got a table with this stylesheet: table { border : none; font-size : 12px; line-height : 20px; width : 100%; border-collapse : collapse; border-spacing: 0; } th, td { border-left : solid 1px #E2E2E2; border-top : 1px solid #E2E2E2; color : #231F20; padding : 10px; text-align : left; vertical-align
remove checkbox value onload
Hello and thank you to all who have helped me previously. Here's my predicament. I am using ExpressionEngine and Solspace's Freeform Pro. I have my form set up so that the user fills in the information and then clicks the submit button, which is labelled "Continue" which then takes them to a page where they can review and edit the date they just filled in. Basically this is the same form but the user has the ability to edit their information and then click the submit button. Here's where I'm
Need help using a variable as a key for $.post()
Hey Guys. I am using $.post() inside a user defined function. I am trying to pass a key value into the $key param. I can't use the $key variable as a key in the $.post() Is there anyway I can use the $key var is a value for the $key. Below is the code function add_items(element, $key){ var cat_id = ($(element).attr("id")); //Insert a new row using an ajax post method, post the the cat_id to reference //under which category the menu item should go under $.post("ItemCreate.php", {key : cat_id })
JQuery not executing
I have a project that utilized the JQuery API and works great in my development environment. When i deploy it to the IIS server, i have to refresh the page a few times before JQuery begins to work....very weird. Any ideas?
unclick other when click one of them
Hi let's say that I have a collection of DIVs into a section with ID <section id="cats"> <div class="cat"></div> <div class="cat"></div> <div class="cat"></div> <div class="cat"></div> </section> when I click on one of them I want to add a class but to remove that class from all other items in the collection to get <section id="cats"> <div class="cat cat-click"></div> <div class="cat"></div> <div class="cat"></div> <div class="cat"></div> </section> and if I click on the item itself or any of items
Simple jquery and input text onchange
Hi all, I have spent far too much trying to get a simple jquery and input box example to work. When someone finishes typing something into the input box, i want jquery to popup an alert. Eventually I will be doing some more code with this but right now i just want to get this working! Here is my example, which doesn't seem to work: <!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script> <script type="text/javascript">
How to find a previous class in a previous row and get it's value
Hello, I have a button that is on every row, I need to find the value of a class that is in my heading. I have the following that is returning "undefined" . I have this same code to find classes and it works fine. var $item = $(this).parents("tr").prevAll(".lastitemno").eq(0).val(); The the class "lastitemno" has a value assigned by a cgi program, but the var "$item" is returning "undefined". There can be any number of rows between the button and the class defined in the heading.
How to get the inner html of individual sticky on save click?
Hello Everyone, How can i get the inner html of individual sticky on save click here in alert box. So that i can directly insert this div element into database. checkout this fiddle once and help me. http://jsfiddle.net/y38rhg7s/15/ I would be thankful Thanks in Advance Satish Chandragiri
adding a score counting to my jquery
Hi there, I am trying to add the scores of the images ,If I drag and drop the image in the panel then the score adds up. I have a Javascript version of it for multiple clones.That is even if I drag and drop the same image Then the score adds up javascript version http://jsfiddle.net/qo88L3nx/2/ What do I need? I want to add a score system to my Jquery script. Here is my Jquery fiddle http://jsfiddle.net/1xnmtyqs/20/
How to validate Iframe input field data ?
Hello to all,,, i am using iframe to get credit card details on my site,, though this iframe is genrated through some payment gateway site... my question is that ,, whether is it possible to get iframe fields values and validate those input fields at my site ? please guide .... thanks in advance ....
getting data from closest input
hi yall so im trying to figure out how to get some data, without over naming my elements but i cant seem to get it done. ive got a little piece of html code in a php file, with a text input and a button. i incude this php twice on the same page. now, how do i get the value of the text input closer to the button pressed? the code is something like <input text> <button> <input text> <button> i haven't given any element an id. they all have classes (which is class="btn" for the buttons and "text-input"
Support for Spring Security
Does jQuery support integration with spring security?
attempt to add function for click event handler fails with object required
I have the following function as a click event handler. $(document).on("click", "input[id *='submitReqSelect']", function (e) { debugger //alert("firing"); var sDialog = "#AddSubDialog"; var lineID = e.target.id.toString().substr(15); var selector = "input[id*='rb_'], #ReqInfoHolder" + lineID var ReqID = 0; var qty = 0 var subLineNumber = $("#newSubLine" + lineID).val() $(selector).each(function
How to make divs equal height within a main container?
I am trying to make the divs within a main container have equal heights.I got this code from http://stackoverflow.com/questions/11688250/setting-equal-heights-for-divs-with-jquery. Here is a fiddle:http://jsfiddle.net/g9g869ny/ I am also trying to make it responsive(from max-width upto 768px), so If the device width scales down, I would like the script to recalculate the Height for every/any change in the WIDTH of the device - is it possible to constrain it that way? Please help.
How to keep stickys color on browser refreshing?
Hello Everyone, Please checkout this fiddle once & help me.. http://jsfiddle.net/Satish_Chandragiri/y38rhg7s/2/ Here i can apply colors to each sticky notes on mouse right click. But problem is after page refreshing color for each sticky is not storing. And backgroud color is not applying to textarea of sticky. so please checkout this & help me. I would be thankful Thanks Satish Chandragiri
Adding easing to jquery css swap
HI I am trying to add some easing to a script I'm am working on and I can't get it to work right. var $mainlogo = jQuery('#mainlogo'); var $menuback = jQuery('.x-navbar'); jQuery(document).scroll(function() { $mainlogo.css({display: jQuery(this).scrollTop()>170 ? "block":"none"}); $menuback.css({background: jQuery(this).scrollTop()>170 ? "rgba( 255, 255, 255, 0.7 )":"none"}, { easing: 'swing', duration: '2000' }); }); What Am I doing wrong? I just want it to fade in instead of an immediate appearance.
Is there a way to fire a click event with a this function
//Control Save $(document).keydown(function(e){ //CTRL + s keydown combo e.preventDefault(); if(e.ctrlKey && e.keyCode == 83){ alert("Control S has been pressed!"); }
How do I stop enter key from triggering a non-submit button?
I have a form with a bunch of selects and a single text input. Form data is sent via $.post whenever the inputs are changed, so a submit button isn't needed. The form does contain one regular button (using the button tag, not the input tag). The button shows a jQuery UI dialog when clicked. If you press the enter key in the text field, the browser submits the form but it also acts like you clicked the button (the dialog appears). That makes no sense to me. Why is this happening and how can I stop
onclick event on a select
Hi Guys I have an select dropdown looking like this: <select name="dietary" id="dietary"> <option value="none" selected="selected" >Select Option</option> <option value="Normal" <?php echo "$selected1" ?>>Normal</option> <option value="Vegetarian" <?php echo "$selected2" ?>>Vegetarian</option> <option value="Halaal" <?php echo "$selected3" ?>>Halaal</option> <option value="Kosher" <?php echo "$selected4" ?>>Kosher</option> <option value="Other" <?php echo "$selected5" ?>>Other</option>
How to set css zoom level to local storage
I am using a jquery function to zoom in/out. I need to save there preference to local storage. All of the examples I have found save strings and objects, wouldn't this be a interger? plunkr
I need a web hosting site thats hosts javascript websites.
Please recommend. tyvm.
Issue on Processing Array Items Into a Div
can you please take a look at this code and let me know why I am not able to add the array Items into the .box? I already used the .text() and .html() var letters = []; var str = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z"; var letters = str.split(","); for (var j = 0; j < letters.length; j++) { $(".box").html(letters[j]); }but they only add the last item "Z" into the box.
What's the difference !!?
whats the difference in performance or any kinda difference between these two?? 1. function Declare(message){ alert(message); } Declare("Hi 1"); Declare("Hi 2"); 2. function Declare(message){ alert(message); } var declaration1 = new Declare("Hi 1"); var declaration2 = new Declare("Hi 2");
Moving an element on multiple clicks ?
Basically I would like to create a button that moves a div to a place then it stops until I click on it again and it move somewhere else. How do I do that ? This is what I have and it only moves the div once. I want to click a second time and the block goes down. (I'm just trying to move a simple square on a page using a buttin with jquery to learn.) <script> $(document).ready(function(){ $("button").click(function(){ $("#div1").animate({left:'250px'}); }); }); </script>
HTML in a Div
I want to load a HTML file within a div, I'm using .load(), the problem is, the HTML file is not loading within the div ?
How to access values of 'this'
Can't seem to work out how to pass values of this around. In the code below 'pData' is passed back from AJAX. In the generated table I click on a displayed 'id' class='disp'. choice=$(this).text() gives the value of 'id'. How can I get the associated data for that record with that 'id'. function showTable(pData) { var table_str=""; var prev=""; var i=0; var last=""; table_str = "<table id='peopleTbl' class='center' border='4' cellspacing='6' cellpadding='4' bgcolor='#fff99d'
complete newbie question about fadeIn
Hi i'm trying jquery for the first time and until now it seems to work at 95% :) So i'm doing a simple fadeOut fadeIn , but it seems like one has to be completed before the other is triggered. What i want i simply my image to overlap each other... but they don't, they do fade out, then when the fade out is done they fade in.... how can i do that so they don't display blank before triggering the fade in? my code is this : sliderInt=1; sliderNext=2; $(document).ready(function(){ $("#slider>img#1").fadeIn(1000);
basic jquery script not working
im trying to make a script so that if a user selects a county ie. 'United Kingdom' then it will show Postcode in a input field but form some reason im getting no joy...can anyone give me advise on this please...thank you $(document).ready(function() { var locator = $("#locator"), location_selected = $("#location option:selected").text(); if (location_selected == 'United Kingdom') { locator.val('Postcode'); locator.addClass('locator-pattern');
How are jquery plugins made?
I want to create my own effects function that will manipulate my image in a certain way. There most likely is a plugin out there that can do it but I would like to create my own. How are exisiting plugins made? Do they use animation software? I have seen Adobe Edge but not sure if that will work with jquery. Any comments will be much appreciated, thanks.
Change image on mouseover and mouselick
Hi, I have image like this <img src="~/Content/images/export_menu.png" id="jq-export-menu" alt="" style="float:right"/ and my goal is when I hover the image with the mouse it will change to another image.. and when my mouse leaving the the image it will back to the first image. The idea is like context menu in firefox.. Normal State Hover State Click State The color from the image will be different depends on state it has.. I am trying something like this.. but it doesnt work. $('#jq-export-menu').mouseover(function () {
hyperlink click event handler doesn't working on jquery 1.7.2 on google chrome version 37.0.2062.120 m
hello everyone, i having problem on the new update of google chrome. i have provide a small code you can try it here , here is the code: $(function () { bindHyperlinks($('body')); }); function bindHyperlinks(root) { root.find('a').click(function () { var url = $(this).attr('href'); loadPage(url, function (html) { $('body').append(html); bindHyperlinks(html); }); return false; }); } function loadPage(url, cb) { var frame =
How to increase the size of the Text content?
I have changed the color of input text in onBlur function. I want to increase the entered input size content larger in onBlur function? Its not increase the text size. Is it possible? My jsfiddle http://jsfiddle.net/L8brgc0b/2/
How to resolve this issue?
I have assigned the string date in html 5 input date field on onload. but its not working. My jsfiddle http://jsfiddle.net/zemysckv/1/
How to resolve this issue?
I have assigned the string date in html 5 input date field on onload. but its not working. My jsfiddle http://jsfiddle.net/zemysckv/1/
Insert element at text position of mouse click
Hello, I have a div like this: Copy code <div id="primdiv">Hello World</div> For this Ive bind the following code: Copy code $("#primdiv").bind("contextmenu",function(e){ if(e.which == 3){ ...... }//if return false; }); The if clause gets run when the user clicks with the right mouse button in the Text "Hello World" (= Works fine). Now I want to insert a new element at the position of the click. For example when the user clicks after the o of Hello the new
Next Page