fade type of commands
Hi all, yes, I saw the workaround at https://forum.jquery.com/topic/fadein-and-fadeout-problem however, from the semantics: a fade really should not remove an element to "display:none", but fade to .0, so that the element is still there, but the appearance is changed. Even on the w3schools site, there is a horribly bad example at this example with three boxes : If you look closely you see they disappear, and the blue box jumps up. Of course there can be applied that workaround by defining classes
CSS rendering problem in IE8
Hello All, I have an FOUC error I ran into with IE8. I tried fixing it using conditional statements, which did work on my local server, but not in JBOSS on our test server for some reason. Anyway, after doing lots of searching it appears to be the result of document.ready() firing at the wrong time. See this link on SO about the issue. I tried to use the code that KevinB used there, but I couldn't get it to work at all. Is there a better way to ensure that the document.ready() is really ready
IE doesnt refresh data when call ajax
//call from basket txt file $.ajax({ type:"GET", url:"usrbasket/userno.txt", data:"", success: function(msg){ $('.baskettbl').html('');//clean basket $('.baskettbl').append(msg);//fill basket (also again) } }); I try above codes; to held datas in a text file. When user add any item, codes look at that text file and add item into it again. But Internet Explorer (trouble maker) doesnt refresh that text file like in Chrome. Therefore basket is always
How to use .on() with generated elements so that it works in <=IE8
Hi, I have a little function that I need to call when I submit a form. The form is generated dynamically from another function. What I am using works fine in Chrome, Firefox and IE9+ but it does not in IE8 and below. Here is my code: $('#map').on('submit', 'form', function(event) { event.preventDefault(); var solicitorID = $(this).attr('id'); solicitorRequest(solicitorID,applicationID); });In IE8 no errors are thrown - the form just simply refreshes the page as it would without the jQuery. I've used
Problem of resizing an image with jquery
Hi, I am loading an image from my local computer (with an input type="file") : $tabContent .= '<form id="form_avatars" action="save_custom_avatar.php" method="post" align="center">'; $tabContent .= '<div align="center" id="div_avatars">'; $tabContent .= '<button style="height:100px;width:100px;" disabled id="avatar_button"><img id ="img_avatar" src="../images/icons/user-green-icon.png"/></button>'; $tabContent .= '</div></br>'; $tabContent .= '<div align="center"
jqeury[1.9.1] problem : checkbox on/off manipulation
(sorry my poor english) Hi ! Always thank you for your efforts. I have developed some javascript code using jquery 1.9.1. by the way, i've got some problems. input tag (checkbox type) manipulation doesn't works well. <my .js code> --------------------- bind click event. var chkbox = $('#chkbox'); var allchk = $('#allchk'); if( allchk.val() == 0 ) { chkbox.attr('checked', true); allchk.val(1); } else { chkbox.attr('checked', false); allchk.val(0); } --------------------( my purpose is checkbox
Jquery ajax binding to c# simple method.
Hello All, I am got stucked at one point.. I am performing an operation of passing my method to aspx page. Like as follow.. url: "Employee.aspx?callmethod=addEmpData" addEmpData is my static method on Employee.aspx page. I dont want to use web method concept here. Now i want to pass parameters to this method from jquery to c# page like as follow: var EmpParam = { Name: $('#dataDiv').find('#Name').val(), Address: $('#dataDiv').find('#Address').val(),
Trying to develop a playable 'music composer' but my audio is out of sync.
Hi Guys, I'm working on building a musical composer whereby you see a musical stave (staff) with both clefs (treble & bass). What I have is musical beats (semibreves, crotchets, quavers etc) which you can drag and drop onto the musical stave. From here, I then wrote a jQuery script to read all the notes that are placed on the stave, building like a playlist. So from here. I pretty much have 2 playlists, 1 for treble clef and one for bass clef. To play the audio, I'm playing the first file of each
click and on('click')
Hello what's the difference between these 2 lines of code $("#selector").click(function(){ ..... }); and, $("#selector").on('click', function(){ ..... }); Thank you
jQuery File in Blogger
I created my jQuery file to use in my blog. Because blogger does not allow to upload files I am trying to find a reliable web where I can upload my jQuery file and then call it from my HTML file in blogger like: <script src="https://website/myjQueryfile.js" type="text/javascript"></script> I research all over the internet for 5 days and I am not able to find a good a reliable web for this purpose. Any help would be highly appreciate. I would think that google, yahoo, microsoft or any of those companies
MySQL data animate in scrolling list
Hi, I'm displaying a list with three entries. Those entries come from MySQL database. With Ajax, the database is checked every five seconds for new entries. The display of the new items works fine, but I would like to scroll in a new item and scroll out the oldest one. eg: item 3 item 2 item 1 then there is a new item. item 4 item 3 item 2 item 4 should scroll in from the top and item 1 should disappear. i found a good tutorial, but this one doesn't work with a database and I don't know how to implement
remove Firefly on responsive website
I have a website that is using using jQuery firefly by Matt Stevens and i want to remove it automatically in mobile platforms. Is it possible? <script> $(function(){ $.firefly(); }); </script> Source: https://github.com/Matt-Stevens/jQuery-FireFly Thanks
selectors optimazation
hi speaKING OF jquery selector optimization if we have something like .parent .child compare selectors in speed optimization manor a:$('.parent .child') b:$('.parent').find('.child'); c:$('.child','.parent')
Access/Manipulate a 'FileSelect' element w/ JQuery?
Is there anyway you can manually assign or inject a file to a file upload/file block of code? I am using PhoneGap that captures a photo. writes it to a temp area say: file://templocation/image_0001.JPG and gives me this path as a 'string' I want to pass that to the fileupload box if at all possible, but I first need to see what it looks like. The Form: <form id="fileupload" name="fileupload"enctype="multipart/form-data" method="post"> <input type="file" name="fileselect"id="fileselect"></input>
.width returning incorrect value
Hi. I have a CSS media query with a breakpoint at 768px. My conditional in my jQuery is set to 768 but I realised that the .width element seems to be incorrect. I did a little test, and when my breakpoint changes (at 768) the .width outputs 751 and therefore doesnt cut off the code at the right time. I also notice that if the browser is resized at speed it seems to be always different. This could be because of how I have my code setup. function checkWidth() { var windowsize = $(window).width();
how to use Autocomplete Combobox and retrieve data from my database?
I tried several things but nothing work. Can anyone help me.
focusin for <a>
Hi Guys, I need to implement pop up help.It should appeare when user move focus to ancor. I am trying to use focusin() focusout() but seems like it doesn't work for <a> Is any way around?
Jquery to call function in C# class library
I have a class library which has a class named 'MyClass' inside the namespace 'MyProject.MyNamespace'. There is a method called 'TestMethod' which returns a string. How can I execute this method and get the returned string from JQuery? I am trying to do this in a jquery which is in a different project (an MVC application) called 'MyMvcApp'. Please help me Thanks
Check width function help
Hi. I have made a small function to check the width of the browser, and included an if statement to run a piece of code. var $window = $(window); function checkWidth() { var windowsize = $window.width(); if (windowsize < 768) { $('html').swipe( { swipeRight:function() { $('html').addClass('js-nav'); }, swipeLeft:function() { $('html').removeClass('js-nav'); }
How to prevent direct access to load content
I have a php page that uses the a load request (see bow). I would like to prevent people viewing the content directly. I understand I could possibly check the header (also see below) but this apparently can be easily hoodwinked. Any suggestions? Header check; </php function is_xhr() { return @ $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] === 'XMLHttpRequest'; } if( is_xhr() ){ // respond to Ajax request } else { // respond to normal request } ?> The load request; $('.mydivcontainer').load('myContentFile.php');
Thinking of using an Array, is this best practice? Help!
I basically have a static map using gmaps3.net. It has 3 address points which work wonderfully. Now I need to grab them from the database and append them. I am OK to do this, but I think I need to put it into an array and somehow bind the results to the 'values' section. Whenever I change views I will destroy the map and re-create it, outputting the below logic: I just need to somehow get the address fields dynamically and inject them in. What would the best way forward be? Are you able to give
Get request attributes in JQuery
When loading a page, I have the following in my controller: request.setAttribute("myAtt", "Testing"); I need to access and use this attribute in a JS file. Can anyone help??
Detect the HTTP State of the browser
Hi, I am looking how to detect/identify the HTTP state of the client browser. I am aware HTTP is stateless. The reason is I have a financial website which needs to be refreshed first time only once the user logs in to client PC. But my problem is How to uniquely identify the client keeping in my that each client will have their ISP/company router's IP. Each client will have different power scheme options defined and set, thereby some client pcs will revert to sleep mode. I could probably use HTTP
Table row add and remove mysql data
I'm new in jquery-Ajax. To add record to mysql and show this bottom of the form I'm using Jquery. this is my code: $(document).ready(function() { $('#preloader').hide(); $('#preloader') .ajaxStart(function(){ $(this).show(); }) .ajaxStop(function(){ $(this).hide(); }); /*********************************************** INSERT DATA **************************************************/ $('form.insert').submit(function (e) { e.preventDefault(); /*update problem solved*/ for ( instance in CKEDITOR.instances
Adding loop to an appended var (confused)
Hi ive got a bit of a problem which im finding hard to solve. ive got a var which has html that im appending to a div. but i have a loop of information that needs adding inside images div. how would you normally get the blue data into where the blue ???? are in the var, Im proper confused. ========================================================================= var counter = 0; $.each(images, function(key, value) { counter++; if (counter > 4) {} else {
Is there any way to maintain the slidetoggle state across requests?
We have multiple tables that are expanded/collapsed. When we press the submit button we would like to maintain which table is expanded/collapsed. $("#dbheader").click(function () { $(".dbmiddle").fadeToggle("slow"); }); $("#scheader").click(function () { $(".scmiddle").fadeToggle("slow"); }); $("#cdheader").click(function () { $(".cdmiddle").fadeToggle("slow");
how to trigger .change() event when chg is NOT triggered by user...
hi, I'm finding that a .change() event on a typical dropdown does not get triggered if the change() occurs as a result of programming, instead of user input.. what is the solution? I have a situation that is fairly typical, I assume... #countries has list of countries... if I change to a country that doesn't have any states then the #states dropdown becomes empty.. (this is already working fine, and I can't tinker with this...) what I need: if the #states dropdown becomes empty as a result of
Need to prevent Accordion not to refresh
Need to prevent Accordion not to refresh after the use of the menu item I got inside each content panel. What I did is a sidebar question chooser for a test. I have built it with asp:menu inside each content panel, up to there everything work fine and I like the effect that it give my multi-level menu. But everytime an menu item (questions) is selected and use the accordion refresh (might be the page) and get back to default position. Is it possible to prevent that and how, please. The menu is dynamic
Changing from one header to the other
We have two headers. One is a full header, which is 100px in height. The other is a condensed header, which is 50px in height. We are creating a parallax site where, once the second section hits the top of the browser, we want the condensed header to replace the full header. Currently, we have the full header coded out in a div called header-main. We created another div for the smaller header, called header-sub, which has display set to none, by default. Here's what I've started for my jQuery:
Page Transitions Help Please
Hi, I am creating a website with all the pages on a single HTML file. To make the website change page from the navigation I have used this jQuery code: $(document).ready(function(){ $("body").css("display", "none"); $("body").fadeIn(2000); $("#navlist a").click(function(e){ var pageState = {}; e.preventDefault(); changePage(e.target.hash, 'fade'); $("#navlist").attr("className", e.target.hash.slice(1)); }); $(".menu a").click(function(e){ var pageState = {};
End date calculation from DatePicker and Term input
I am using a datepicker and have created 3 input fields. <label>Start Date:</label> <input type='text' name='StartDate' id='StartDate' /> <label>Term:</label> <input type='text' name='Term' id='Term' /> <label>End Date:</label> <input type='text' name='EndDate' id='EndDate' /> When a date is added into the StartDate and a number is added into term (Years), the end date should equal the StartDate plus the number of term years. Therefore if start date is 01/02/2013 and term is 2 years, the EndDate
click event to trigger drop down list
I'm using absolute positioning to place my form labels inside my form input and select fields and I'm able to show/hide the label based on focus() and onblur() events, however, I have some undesired effects with the drop down select boxes where if you click on the label portion, the label disappears appropriately but the options are not revealed until you click it again. Is there a way via jquery to force the "drop down" event on click of the label element? I've tried $('#selectID').attr("disabled",
How to retrive Images from database using Jquery
I'm kind stuck on this. My situation: I have a Oracle database with a table where I store images (the file name,albumid, the mimetype of every file and the binary data in a BLOB plus a unique ID). Now what I'd like to achieve is to load all image from the database using AJAX and the GET method. Viewing a specific image using the plugin, AJAX uses the returned data to fill an <ul> somewhere in the document, and that would be the freshly-loaded image. Alright here's some code: $(window).load(function()
jQuery Lightbox/Colorbox/Fancybox breaks jQuery image cross-fade. HALP!
O, hallo. :| Sorry to bother... I hope I'm posting this in the right place. There were a few areas that looked like likely places to put this, but I figured this was the most relevant. I've tried all three of the above "boxes" and have the same issue with each. I currently have a page in which I'm using a jQuery image cross-fade slideshow. That works just fine on its own. On that page, I also have a menu along the top. I want the links to pop up in a box. I suppose you can call it inline
Adding Menu height to submenu height
Hello, here I am attempting at making the topmenu extend its own height as the submenus reveal. Can you please explain to me why it is not working? $('#topmenu a').hover(function() { $('#topmenu').stop(true, true).animate({ 'height': $("#topmenu").css('height') + $(".sub-menu").css('height') }, 'fast'); }); $('#topmenu').mouseout(function() { $('#topmenu').animate({ 'height': $("#topmenu").css('height') }, 'fast'); });
The most bizarre thing you'll see (or closest to it)
OK I'll try to explain this as simple as possible; I'm trying to parse XML that I get through web service, using jQuery. All is doing as it should, until I've noticed that for the love of God I can't parse a node that is named "image". long story short (and 2 hours later) I've noticed, that the problem is in the TAG NAME. Obviously, "image" is a reserved word or something like that??? Here's a demonstration; firstly, I simulated xml, that has "image" node and won't display any results. Secondly,
Amount of elements can not be evaluated?
Hi all I have a serious problem and I need your help. I got from AJAX back the following Labels "Software Engineering", "Infomatics", "Software Architecture". Now, I put these elements into an "input" (called characteristic) and add after every "input" I put a checkbox (called characteristicsYesNo) . These is the code for that: function(data){ for(var i = 0, cnt = data.Characteristics.length; i < cnt; i+=1) {
Updating haccordion.js to work with newer jquery
I've been using the plugin called haccordion (http://letmehaveblog.blogspot.com/) My original page with the working plugin (and jquery 1.2.3) http://www.brightsideresumes.com My test page: http://brightsideresumes.com/tmp.html Once I go above about jQuery 1.3 the plugin stops working like it should. I'm no hardcore programmer and having a hard time figuring out what the issue could be. I was hoping someone might be able to point me in the right direction right off - I'm guessing something was deprecated
serialize() does not registed the hidden value that were assigned using jquery.
Hi I have a form with in it i have 2 <input type="hidden" and the values are currently empty. However, thru my jquery code i assign value to it. now when i want to pass the values using ajax to php file those new input will have no values! here in my code. I think i need to use Live() function somewhere in my code for this to work but i can't seems to figure it out. Note: I am using the dialog UI to show a form $(function() { $( "#dialog-form" ).dialog({ autoOpen: false,
Tracing jQuery Error
Hi! I'm having a hard time tracing and error that I'm seeing in Firefox's Error Console: Timestamp: 2/8/13 7:38:48 PM Error: Error: Syntax error, unrecognized expression: a[href^=/] Source File: http://ccchapel.dev/CMSTemplates/_CCC/_scripts/jQuery/jquery-1.9.1.js Line: 4421 I used the uncompressed version of jQuery 1.9.1 to try and trace the error and found this (line 2 is 4421): Sizzle.error = function( msg ) { throw new Error( "Syntax error, unrecognized expression: " + msg ); }; What's
Next Page