problem in slideDown and slideUp
hello, code of slide.html is as follows : <html> <head> <script src="select.js"></script> <script src="jquery-2.1.1.js"></script> <title>Home page</title> </head> <body bgcolor="#E6EBF5" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <fieldset> <legend>Select A or B</legend> <form id="form_A_B" action="" name="Frm" method="POST"> <table width="100%" border="0" cellspacing="1" cellpadding="1" align="center"> <tr Style="font-size: 1pt"> <td width="50%"> </td>
form refresh, if statement not meeting condition
Hello, this is regarding form submitting without refreshing the page. I think i isolated the problem (i think) but not sure how to go about fix or handle the problem. I highlighted the problem area in red. the msg and "saved" conditions are not being met. after some troubleshooting and searching i learned the value returned is a object and therefore it will never meet the if statement condition. the value returned in msg is "saved" confirmed by the alert stage4 but its not equaling msg == 'saved'.
Form checkbox checked value not activating
I am using a form whereby the value from the selected checkbox is added to a link to define a search across a site. But it is not working. When i manually add "checked" attribute, I am able to get the input value via alert but value returns as undefined when i try to run the form. Example:http://jsfiddle.net/CJFS7/2/
how to use javascript template?
This is the code I use to get data from my database.But I want to use jquery templates to give a nice display to my data. <script> function makeTable(data){ var tbl_body = ""; $.each(data, function() { var tbl_row = ""; $.each(this, function(k , v) { tbl_row += "<td>"+v+"</td>"; }) tbl_body += "<tr>"+tbl_row+"</tr>"; }) return tbl_body; } function getEmployeeFilterOptions(){
fast summation of multiple textboxes
hello, i have an html same as mentioned below.it has multiple textboxes and also some span elements. the class name for all the textboxes is textField and id is according to the name of the labels. the calculation is as follows :- Balance1=Value1 + Value2 Balance2=Value3 + Value4 NetBalance=Balance1 - Balance2 Total=Value1of A + Value1of B + Value1of C + Value1of D + Value1of E i have performed the whole logic using on(blur()) function. but i have an issue here. i select a textbox then enters a
i have a select box with some integer value, how can i fix to show 1decible number?
HI all, i have a problem to fix one digit decimal no for select values. i am fetching the integer value from database which is going to be in decimal number by the ruby code. but i am facing the problem with decimal number. some option in select list showing so 7-10 decimal number but i want to fix it for one decimal point. please help me for this and give me some code or idea related to this. thank you
ASP.NET jQuery: Trying to select textbox in gridview: edititemtemplate
ASP.NET jQuery: Trying to select textbox in gridview: edititemtemplate I'm trying to run a jQuery function when a key is pressed in that textbox. While the code worked great when I applied this to a formview, it's not working with a gridview. $(document).ready(function () { var MaxLength = 500; $(#'<%=gvViewNotes.FindControl("txtNotes_e").ClientID%>').keypress(function (e) { alert("hi"); }); }); When the page loads, I get a
Im trying to count Input fields added by a popup
Hello, Im trying to count Input fields added by a popup, but my event isnt getting fired. The input boxes are being added <div id="CC" style="display:block"> $("#CC").change(function(){ $("input[type=text]").each(function(i){ if (i > 8) { alert("Too many addresss have been added to the 'CC'
Custon Tooltip script creating duplicates
Hi, I have been trying to write my own tooltip script. I have the tooltips being created on mouseenter and a timeout to remove them on mouseleave (using .hover()). I have found that if you move the mouse off of a visible tooltip and back onto it another sub-tooltip is created and the oroginal one never disappears. Can anyone explain what I am doing wrong? My code can be seen here: http://jsfiddle.net/atwright147/YL9mm/ Thank you for your time :)
Jquery choose date from manual slider
Hi every one. I'm beginner in jquery and i need to do something like shown in the image bellow. I want to choose a date from a manual slider with tooltip. Do you have any idea or example to that? Thank you in advance for your help.
spell checker
Can anyone recommend a good spell checker?...one that highlight the word as well as a option to chance it?...if possible Thank you
Get the iframe created in the future
Hi for all, I'd like to perform some procedures using the load event of an iframe (ifr-feature). However, the iframe will be created within another iframe (ifr1). The detail is that the iframe is created from a user action and in that sense it does not already exist. The only information I have is the ID of the iFrame. For that i'm using the 'on' to try to get the iframe created in the future, but this is not working. <iframe id="ifr1"> ... <iframe id="ifr-feature"> -- created in the feature
Some jQuery and Javascript related questions.
Hi, I have some jQuery and Javascript related questions. I'll be glad if someone can respond me. 1. Is .fn equals .prototype? If so, why is it named as .fn? 2. What does $ mean as a function prefix or function parameter? e.g: $(function() { or (function($) { 3. Why ;(function() or ;$(function() isn't a syntax error? 4. What does ~ symbol do as a prefix to return? ( ~return something) 5. In an object literal, how can I make `this` refer only the literal, and not the object that is being handled by
Capture Same Row HTML Tag Under Table
Hi Guys, Here's what I have so far. As you can see those were generated with this codes: <table class="table_format"> <tr id="header_name"> <th>Status</th> <th>ID</th> <th>Name</th> <th>Job Title</th> <th>Job Code</th> <th>Cost Ctr</th> <th>Country</th> <th>Tower</th> <th>Team</th> <th>Hire Date</th> <th>Email</th> <th>NT ID</th> <th>Sup Name</th> </tr> <?php $query = "SELECT * FROM tb_active WHERE sup_name = '$user_id'"; $result = mysqli_query($con, $query); while($row = mysqli_fetch_assoc($result))
Toggle (Show and Hide) a function
Hi I have what I thought was a simple problem but my solution does not work. On click of #FuBuHelp I need to toggle (Show/Hide) the .HelpBox and .HelpInformation, I have tried to simply change this line "$('.HelpBox').text(HelpInformation).show();" to .toggle instead of .show and this works but once toggle is on "Show" the .HelpBox and . HelpInformation flickers and I move the cursor. I'm guessing I'm being blinded by something and the // Co-Ordanties is also toggling .... any help or advice of
Create common scrolls for two iframes
Hi, <div id="divMain"> <div id="divChildOne" style="float: left; width: 50%;"> <asp:Label runat="server" ID="lableOne" Font-Bold="true"></asp:Label> <br /> <iframe id="iFrameOne" runat="server" style="width:100%;" /> </div> <div id="divChildTwo" style="float: right; width: 50%;"> <asp:Label runat="server" ID="labelTwo" Font-Bold="true"></asp:Label> <br /> <iframe id="iFrameTwo" runat="server" style="width:100%;" /> </div> </div> This is the design of my page where i want to show to docs side by side.
How to retrieve data from Json and display on page using HTML5
Hi, I have a json data that are on the database and I want to render the results on the page using jquery and html5. How should I do that? In order to make things easier for now, let's assume I have a json file right now instead the database. Thanks.
toggle-slide element sideways....
I found this thread somewhat useful for sliding elements sideways... http://stackoverflow.com/questions/9864305/sliding-divs-horizontally-with-jquery esp this fiddle, http://jsfiddle.net/sg3s/rs2QK/ but it uses $('div').animate({width: 'toggle'}); can this be applied for when element is initially hidden then apply slide sideways to reveal it? (oh man, just realized you get a 404 on this fiddle now... it was posted on SO thread mentioned above.. was able to see it yesterday..) basically what
How can I activate datepicker only on a textbox click
Hello, Im trying use my tabs to jump to different fields. But when I tab over a datepicker field it activates the datepicker and I lose my tab sequence. I want to just activate the datepicker when I click on a datepicker field. How do I do this? Thank You
Help comparing 2 arrays in jquery
// I'VE GOT two arrays. I want to iterate through itms in the second array to see if an item from the second arry is present in the first array. If it is present I want to effect a function ( alert("jjjj")) and then iterate to the next item and so forth. tx -dave jsfiddle: http://jsfiddle.net/vhabhsrosed/4h9Ef/ $(document).ready(function () { alert("wtfH"); var arr1 = ["red", "blue", "green"]; var arr2 = ["yellow", "blue", "black", "red", "teal", "green"]; $(arr2).each(function
Conserve custom ratio img
I'm trying to conserve a custom ratio in all the images. The ratio is width/height = 7/5. ¿How could I do it? Here you have a exampe: http://jsfiddle.net/Z3LT5/
Parsing XML
I am at a loss. How do I parse this xml? I cannot seem to be able to loop through the "results". What I want as output is: id name description label value label value label value label value ... Please help I am going bald. Warren <?xml version="1.0" encoding="utf-8"?> <tests> <test id="test 1"> <id>test 1</id> <name>Device Testing KPI</name> <description>A summarized Device testing KPI for dates between 01/01/2014 and 06/15/2014 which omits a count of tests conducted.</description> <results> <label_1>Commercial
Using a variable as part of a selctor or attribute?
Hi all - I have a var called seashell that starts at 0, and grows by one number every time someone generates a new form on my page. These forms are generated with the id questionseashell - so if this is the third question the user has generated, the form has the id 'question3'. I'm trying to pick up when these forms are submitted with jquery, but I don't know how to include the var in the selector the way I need to. Here's the code I've tried: $("#question"+seashell).submit(function(event) { event.preventDefault
Jquery popup help
I created a jquery popup from a utube tutorial. it is not working correctly. The mask will not append. (I think this is the main problem). I would also like to adjust it to execute off of the actual page load and not the click event but my attempts to change it have not worked. Any help will be great. <!DOCTYPE HTML> <html> <head> <script type="text/javascript" src="./Embedded_Vids/html_files/jquery-1.8.0.min.js"></script> </head> <style> body{ background: #e2e2e2; margin: 0px; padding:0px;
how to validate the "moviesEditor" or "movieTemplate" bit confused
<header>Tickets</header> <fieldset> @if (Model.Tickets == null || Model.Tickets.Count == 0) { } <ul id="moviesEditor" style="list-style-type: none"> @if (Model.Tickets != null) { foreach (Events.Models.Ticket movie in Model.Tickets)
JQuery how to hide whole div and containing table when href is null or empty
Hi, I have below structure:- '<div class="LinksDiv" style="display: inline-block;width: 400px;">' + '<div><table><tr><td><a href=' + (LinkDictionary[linkKey])[0].Url + '> <img src=' + (LinkDictionary[linkKey])[0].ImageUrl + '></img></a></td>' + '<td><a href=' + (LinkDictionary[linkKey])[0].Url + '>' + (LinkDictionary[linkKey])[0].Title + '</a></td></tr></table></div>' + '<div><table><tr><td><a href=' + (LinkDictionary[linkKey])[1].Url + '> <img src=' + (LinkDictionary[linkKey])[1].ImageUrl + '></img></a></td>'
form wizard without using a plugin
I am in process of building a form wizard. Would like to do this without using a 3rd party plug in like jquery steps etc. Is there a way that I could use what the jquery lib has and with HTML and javascript to build a form wizard?
$.post getting "No Javascript on this page ..."
I am getting a "No JavaScript on this page ..." error on the following jQuery code - <script type="text/javascript"> // Wait until the doc structure is parsed and the browser has created the DOM tree. $(function() { // Ajax capability detecting javascript var xhr; if (window.ActiveXObject) { xhr = new ActiveXObject("Microsoft.XMLHTTP"); // alert("Using Windows ActiveX for Ajax"); } else if (window.XMLHttpRequest) {
tbody display:none with a if condition (Jquery)
Hi, I want to show columns A,B,C if X === North America (accessing a mobile app) or show D,E,F,G if X ===Europe. Both columns will bring data. What is the way to perform this? Should I create the code for North America and Europe in the same index.htm and show/hide depends on the result of X or is there a better division of files I could do? I have seen tbody display:none could be a good solution for my requirement, but not sure how I could implement it using a if condition. Examples are welcome.
Need Feedback for a new book - "jQuery 2.0 Development Cookbook"
Hi guys, I'm looking for some feedback on a recently published book on jQuery, namely, jQuery 2.0 Development Cookbook. Link to the book page: http://www.packtpub.com/jquery-2-development-cookbook/book If anybody is interested, please send a mail to me on paushalim@packtpub.com OR You can comment below this post stating your interest (for e.g., your email id and where would you like to share your feedback - Amazon, Goodreads, your own blog, etc.) I appreciate your help regarding this! Please
Twitter feed not working and rel=nofollow JQuery Error
Hello all, I have a Joomla 3.2 webpage with the home page having a slider and twitter feed. I ran into a jQuery error and my twitter feed and my slider stopped showing. For the slider there was an error showing which said i have to "enable JS in body", I did that and it worked. After a couple of days the twitter feed was back too. The slider and twitter feed now work fine ONLY on the home page. The other pages of the websites say "rel=nofollow" next to the copyright information and also have the
Need to animate canvas fill color dynamically
Hi all, I need to animate cylinder canvas when I enter 10% in the text box it has fill like pouring milk in glass (Animation). I have achieved creating cylinder in canvas and fill color but animation is part is not working. Here is the code for animate () function animate() { requestAnimationFrame(draw); draw(); } Here is my Code is avilable in JSfiddle http://jsfiddle.net/F9PxZ/ Thanks in advance
How do I add a css attribute to a control that I create dynamically?
Why does the following code not work? var radioDiv = document.createElement("div") radioDiv.css("maxWidth", (currentwidth + "px")); Thanks. Gid
Stuck on the basic JS, but can't find the issue.
Hi guys, Could you please see this codepen: http://codepen.io/anon/pen/xEmfv It's quite simple what I want to achieve, but I can't get it to work. The main idea is, when class="attribute" is empty then hide/remove parent with class="attr". Simple right? But I'm stuck for few hours now. Sorry for novice question, but I need solution ASAP. Thanks guys,
Multiple fields with Bootstrap editable and jquery
Hi, I'm having toruble paassing two different fields with Bootstrap editable and jquery. My script is as follows: <script type="text/javascript"> jQuery(document).ready(function() { $.fn.editable.defaults.mode = 'popup'; $('.xedit').editable(); $(document).on('click','.editable-submit',function(){ var x = $(this).closest('td').children('span').attr('id'); var y = $('.input-sm').val(); $.ajax({ url: "add_homepreds.php?id="+x+"&home="+y,
Set script tag contents
I'd like to set a script tag content dinamically. The primefaces generate the code below: <script id="tabView:formEstrutura:lotacoesPesquisadas_s" type="text/javascript">$(function(){PrimeFaces.cw("DataTable","widget_tabView_formEstrutura_lotacoesPesquisadas",{id:"tabView:formEstrutura:lotacoesPesquisadas", widgetVar:"widget_tabView_formEstrutura_lotacoesPesquisadas", selectionMode:"single",scrollable:true,liveScroll:false,scrollStep:0, scrollLimit:0,scrollHeight:"107"});}); </script>
[Explain Please] dynamic form
Thank you for the attention. Can you please explain how this code works? especially the e.preventDefault(); what this code doing with .click(function(e){ ... ? <script> $(document).ready(function(){ var next = 1; $(".add-more").click(function(e){ e.preventDefault(); var addto = "#field" + next; var addRemove = "#field" + (next); next = next + 1; var newIn = '<input autocomplete="off" class="input form-control" id="field' + next + '" name="field' + next + '" type="text">'; var newInput = $(newIn);
Code not working! :(
Hi, I've only just started using JQuery, so it all seems pretty complicated still! I'm building a website, mainly one long scrolling page. I have a header of 100% by 100%, that is in a fixed position over the top of everything else. As you start to scroll, I want it to disappear, to reveal the content underneath. The bit of code that does work is this: (window).scroll(function() { if ($(this).scrollTop()>1) { $('#pippaheader').fadeOut(); } else { $('#pippaheader').fadeIn();
Can't set a condition based on an attribute I can't select in IE but can in Chrome?
[UPDATE. CODE WORKS WHEN USED ON IE AND ON SHARPOINT AT WORK. THE ISSUE IS SEEN WHEN USING JSFIDDLE IT SEEMS] I am trying to create an array based on an attributes (style) value. but I can't seem to select this attribute to build my conditional statement in IE ( 32 or 64 bit) but I can use it successfully in Chrome. Unfortunately we can only use IE at work so I was wondering how I should write this for IE. It took me a while to realize this because I was initially building in IE and only accidentally
php and jquery sessions
hey guys just a quick question...I know it is possible to pass php $_SESSIONS to json...BUT im wondering is there a way of me changing a value of a php $_SESSION by json or jquery somehow please? thank you
Next Page