Text inconsistent alignment in buttons across browsers
Hi, I have shown two browsers that display my text in buttons inconsistently. While initial times Chrome was my choice, now it seem it is not showing the text properly in my buttons. The same is well displayed in other browser (Opera as in figure, or safari etc) I dont know where to check for this anomalies. you may check at this site http://guruttam.com/docs/gmindex.php regards SriKrish "Learning Continues"
document.ready() function confusion
Hi. I am novice to JQuery and i am having difficulty understanding this concept. When we are talking about document.ready() function we say that $(document).ready(function() { //some code }); is equivalent to $(function() { //some code }); When we look at the jQuery documentation, something like this is written there. else if ( jQuery.isFunction( selector ) ) { return rootjQuery.ready( selector ); } This is what handles the part written above. I am not able to understand this. Please help clarifying
help understanding a return when its inside of a .each method
The following .each() function is inside of another larger function. I am having a hard time knowing if the "return;" below, is even nessessary... $('.something').each(function() { aid = $(this); aid.x(-player.aid.speed, true); var aidposx = aid.x(); if(aidposx < 0) { aid.remove(); return; } }); If the point of "return' is to say "now its ok to remove aid", then how else can I write this? What if return; wasn't there, wouldn't aid.remove(); still execute? Do I really need it?? What is the point
some problems with UI dialog
Rcently i am developing a small project with jquery, inside i used the existing UI dialog, but i found some problems during the development. 1. the dialog shows normal in firefox but abnormal in ie9, then debug it in ie9, found the global variable window got problem that attribute width and height is zero, i don't know the reason why occur such strange problem. 2. I used the tag iframe to display sub-screen, but inside the iframe the variable document & window is only available inside the iframe,
slider slidestop
I have the following code... <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" /> <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script> <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script> <script> $(document).ready(function () { $( "slider-step" ).bind( "slidestop", function(event, ui) { alert("done"); }); }); </script> <label for="slider-step">Input slider:</label> <input type="range"
Clearling a List with jQuery Mobile - layout issue
Hello there. I got the simple following function that will populate a DIV element with a list function populate() { var turma = Persistencia.getTurma(); var ct = turma.alunos.length; $("#listaAlunosChamados").remove(); //removes the UL if exists (i tested w/o it) $('#alunosChamados').html('<ul data-role="listview" id="listaAlunosChamados" class="listaAlunosChamados" data-inset="true">'); // creates the UL into the DIV #alunosChamados while(ct--) { // fills the list var aluno = turma.alunos[ct]; if(aluno.presente)
Multi Instance Plugin Issue
Hey all, I'm in the process of writing a JQuery Plugin, and have ran into a bit of a snag. When I create multiple instances of a plugin, it always ends up returning the last instance that was created. Can any of you JQuery wizards help me out? Here is an example of the code that I'm using. I'm currently testing this in chrome. <html> <title>Sample</title> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script type="text/javascript"
Reload page on deleting cookies
Hi, I wonder how you reload a page, when you manually delete browser cookies using the browsers Ctrl + Shift + Del menu. Something like: $('window').bind('delete_cookie_event', function( e ) { location.reload(); }); I'm have looked on the internet for a solution, but I find nothing but pages on how to delete cookies using JS. Thanks in advance! Chirstophe
script is displaying as child node by mistake
Hi I'm using jQuery plugin for a slideshow. It is working fine until I include it in XML DOM to g et Node Values. The script I'm using is adding on as a chlid node. See my demo here: http://geewebsolution.com/demo.html <code> <script type="text/javascript"> function loadXMLDoc(XMLname) // { var xmlDoc; if (window.XMLHttpRequest) { xmlDoc=new window.XMLHttpRequest(); xmlDoc.open("GET",XMLname,false); xmlDoc.send(" "); return xmlDoc.responseXML;
Adding a row to a table dynamically inside another table
Hi pals, I am new to jquery, especially this kind work.. Please help in my work. I need to insert a row onclick a button, 'add'. Inside that table I am having another table, which has options(three column) of the parent table. And I am having another button called 'add options' which onclick I need to add a new row to the options table appropriate to that parent row. This is the screeshot of the actual. This is my HTML <STARTS HERE> <div id="fourthDynField" class="fieldType" style="font-family:
AJAX replaceWith using jQuery
I have a page that has two forms on it. Each form is a different way of filtering the results on the page. The first form is a `collection_select`. The second form is a `text_field_tag`. Each submits to the same controller and returns data using `index.js.erb`. Firebug shows that the Ajax call works for both of them and returns the proper results, however, only results that are returned from the `text_field_tag` form actually update the page. It uses the same code in `index.js.erb` to return
Problems getting value from textbox that has been hidden
Edit: Figured it out. Using .val() instead of .text() did the trick! I'm using jQuery in a SharePoint newform. In $(document).ready I hide a column/field (textbox) with the following code: $("input[title='myField']").parent().parent().parent().toggle(); Then, depending on a choice made in a different column/field (dropdown) I run the same code again to show the textbox. Furthermore, I have overridden the PreSaveAction function to do some custom validation. This is where I run into problems. If the
How to insert any html-php page to a #container by clicking a link button
Well here goes: Say I have a home page it needs to be on display in the browser at all time, Even when I want to call in another page. The correct place for the CLICKED-linked page is directed to the MAIN CONTAINER on the home page. I've looked at many examples but none seem to do this. And when I use jquery the page clicked in the menu shows up on a completely new page. It is supposed to show in the Container on the Home Page. Also should my jquery code be inside the body tags or below the
unable to get text displayed on tab event, sorry for the laughable code, I am new to this!
The Jquery: $(document).ready(function(){ $("#interests").mouseEnter(function(){ $("#contint").show(); }); $("#interests").click(function(){ $("#contintf").show(500); }); $("#interests").mouseLeave(function(){ $("#contintf").hide(500); }); The HTML: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <!--[if IE]> <link type="text/css" rel="stylesheet" href="tabstyleie7plus.css" /> <![endif]--> <link type="text/css" rel="stylesheet" href="tabstyle0921.css"
Slider image with import csv file
how to make a javascript image slider with csv import ? please help me.... !!
JQuery Mobile and PHP
Hello, I am using JQuery Mobile to create a web app, and I am also using PHP with it. Most of the PHP works, except for the PHP in the footers and buttons. What it is doing is making 6 buttons instead of 4, and there is little bits of PHP text everywhere in the page. Does anyone know how I can fix this? Here is some of the code: <div data-role="footer" data-position="fixed" data-fullscreen="false"> <div data-role="navbar"> <ul> <li><a href="#" data-icon="back" data-rel="back">Back</a></li> <!--<li><a
How to multiple select defined elements
$('.class, #id') is the way we normally used to select multiple elements, but if we already defined the variable such as var $a = $('div.a'), $b = $('#b'); Can I bind event on $a and $b at the same time?
jquery plugin - trying to change an elements width/background
I'm using a jquery plugin to create an image slider with thumbnails underneath. My goal is to have the main image's background be `bg.png`, with the thumbnail section background be `wood.png`. I've changed the CSS to what I believe to be correct(see below), but the background of the thumbnail section isn't extending the full `961px`, it's restricted to the `921px` width I've established with the main image. I have a feeling this might be due to nesting within the plugin's php/jquery, I'm just not
Character counter
Hi guys, I need some help with a character counter in a textarea with a maximum of a 100 characters. There must be a text at the outside right bottom corner of the text saying eg 77 characters left. Thanks in advance
select value to $.ajax type post
Hello, Sorry, I looked for in this forum but I didn't find anything :( I want to forward the result of my select (one choice) to my php file thanks to Jquery.ajax but "$('#cdr_search_list').val" seems not to be a good method. In fact, I have the following answer with Firedebug : Array ( [cdr_search_list] => Array ( [0] => test1 ) ) Code : $('#cdr_search_list').bind('change', function() { $.ajax({ url: 'proxy_cdr_get_id.php', type: 'POST', data:
Load Deprecated
The event load (window, image) is the in deprecated list. I could not find the alternative in the discussions or on the specific API entry. Is this just going away?
tablesorter
Do I have to do anything to get the arrows in the headers to show which column is being used for the sort? When I click on the column headers it is sorting, but I'm not getting the arrows.
how reloadPage attribute works on a page?
Hi all, I´m have a problem on my application, i insert some data in two inputs, and when i go to another page and return to previous page the inputs is clear, the change between pages is made for example by <a href="page.jsp"> tag. Studing the page attributes, i suspected if the reloadPage attribute it´s involved with my question, but the default value for this attribute is false, in teory the page already exists in DOM and don´t will be created again.. then, why when i return the page the values
JQuery Cycle
I am using this plugin and I am having problems using one of its functions. I started with this code: http://www.malsup.com/jquery/cycle/pagerHover.html Then I wanted to add the following function -> http://www.malsup.com/jquery/cycle/int2.html at the top left it shows you how to make your plugin advance to slide by clicking on the picture. I have tried and Its working :)... now I am trying to use the one n the right side (Prev/Next) and I just dont have any ideas how to make it work with the code
Dynamic Navbars..
I need to dynamically add and remove buttons from a navbar and have a work in progress that *almost* works.. My navbar html looks like this: <div data-role="footer" data-id="nav-footer" data-position="fixed" > <div id="navbar" data-role="navbar" > <ul id="navcontent"> <li><a>Loading..</a></li> </ul> </div> </div> When necessary I update the navbar as follows: $('#navbar').navbar('destroy'); for each new button { $('#navcontent').append('<li><a .... </a></li>');
trying to determine IF a text element IS a label for a select
I need to be able to tell IF a text element is a label for a select ( if it is I will ignore it ) <div id="text28202" style="visibility: inherit;"> <a id="a_1_3_10" href="javascript:radio28203id.click();" name="text28202anc"></a> <label id="label28203id" for="radio28203id"> <p style="margin-left:0px;text-indent:0px;line-height:1.394;text-align:center;"> <span class="text28202Font1">Strongly Agree </span> </p> </label> </div> In other words - How
Newbie: Ball rolling jquery?
Been looking for a a plugin which will imitate the motion a ball would make randomly moving around a browser window. The closest I've found is http://motyar.blogspot.com/2010/04/firefly-jquery-animation-plugin.html (https://github.com/motyar/firefly) which works great - I can put in an image of a ball instead of the firefly and it moves around the screen great. But, I would like to make the ball look like it's actually rolling (think ball with logo on it). The ball would need to be an animated gif
click event with overlapping
Hello guys, I've read of a nice function a few weeks ago to solve the following problem...: Imagine we have a foto-galery and a layer on the complete page filled with black with an opacity of 50% to make the "background" darker so that the image is in foreground. Now i want to trigger a click event which is on the "normal page" behind the dark layer. But when i click on this, it obviously click on the dark layer because the layer is above all the other elements and the click event isn't triggered.
Show then delay and finally hide
Hi All, I am trying to show a hidden div if a certain condition is met, then have there be a delay and then finally have the div hidden again. Here is what I got: HTML: <span id="category_message" style = "display: none;"><h3 style = "color: red;">Invalid Category</h3></span> jQuery: $j('#category_message').show(0); setTimeout(function(){ $J('#category_message').hide(); }, 2000); I have also tried several variations of this and what happens is that the show works great, but the delay and the
How can I make divs fade in from black and white to colour on mouseover?
Hi, On my page there are four columns of images. please see http://i-n-t-e-l-l-i-g-e-n-t-s-i-a.com/entry.html There is some jquery (which is commented out at the bottom of the html, see script below also) that converts all images to black and white and when you hover they fade to colour, which is what i am trying to apply to these images. however when i do apply it it totally changed my css. Dow anyone know how I get this to work on my page? $(window).load(function(){ $(".wrapper img").fadeIn(500);
Is is better to set up data before click or onclick?
Bit of a jquery noob. I have a simple function that replaces the href content on a link with that of a data attribute. The function looks for the class click-reveal and performs the action. I'm unsure of which is the best route, 1) call a function that replaces all in my page load function, or 2) do it onclick with a redirect. A code sample for the second variation is shown below. var gotoOutPage = function (e) { pd(e); var url = $(this).data('url'); $(this).attr("href", url) window.location
onclick in span
hi guys my code working in ahref now i wanna apply in another div with span, some tips? code bellow. <script type"text/javascript"> //<![CDATA[ function change(type){ $('.teste a').removeClass( 'arial' ); $('.teste a.q'+type).addClass( 'verdana' ); if(type=='page1'){ citem(iten1); }else{ citem(iten2); } } var iten1 = "<? echo $['page1']; ?>"; var iten2 = "<? echo $['page2']; ?>"; //]]> </script> <!-- now this div working.... --> <div class="teste"> <a href="#" onclick="change('page1')" class="arial">on</a>
How can I attributes exist?
I'm a bit of a noob at jquery, so would appreciate some help if possible. I am making some changed to a link, by taking the content of a data tag and inserting it into the href tag. This seems to work ok at the moment but I'd like to ensure that both exist before carrying out the function. Can anyone advise? var gotoOutPage = function (e) { pd(e); var url = $(this).data('url'); $(this).attr("href", url) window.location = $(this).attr('href'); } Thanks in advance.
Upgraded to JQM 1.1.1 and header jump returns - only on dynamic pages
I am using the Sea of Clouds twitter script and it was working fine in 1.0.1. I've upgraded to PhoneGap 2.1.0 and have everything up to par except for this page issue. If I load in 10 or 15 tweets, so that the page has to scroll, on the initial page load, the header drops about 1/4 of the page. Once swiped, the header jumps back and seats correctly at the top of the screen without further issue. Seems like it is only happening on the initial page load. Can't seem to figure this one out. Using
How to make JQM to an downloadable app
Hi, I am sure this must be one of those baby footstep questions. Say I have am having an jQM + php + Db(JPD) built application fully functional. As of now, there is no device specific features that this application is depending upon. If I type web URL it works in the smart phones. Now if I have to provide this as downloadable app is it possible and where should be the cut-off, I mean all processing are done at the server side. (basically nevertheless to say php generates the rendering JQM scripts).
How do I send delete an item using PHP,AJAX,jQuery?
Hello I need to know how to delete an item using ajax and jquery and PHP? Normaly here is how i do it using PHP only <a href="removeItem.php?id=10">Remove Me</a> in the removeItem.php file i do something like this $id=$_GET['id']; mysql_query("DELETE ***********");so I want to do the same thing using jQuery and ajax so the page will not refresh! so when a user click "Remove Me" link it will instantly remove that item without refreshing the page. Thanks for your help
Validate plugin with contenteditable divs
Hi - Is there any way to use the jQuery validate plugin with contenteditable divs? i.e. <div id="editme" contenteditable="">Editable Text</div>What I want to do is something like this: $("#editme"[contenteditable]).validate();I can attach events to the field using syntax like the above. But, since contenteditable doesn't actually create or use a form, I can't figure out what to attach the validate() to. Is there a way to attach a validate() to just a single element without a form? Thanks! -steve
animate buggy in ios 6 / jellybean
Hi, I'm having some trouble with code that's been working for years. Please see http://www4.gsb.columbia.edu using iPhones and iPads with IOS 6, or the stock browser that comes with Jelly Bean. Pay attention to the text scrolling along the ticker-style banner. You'll see that every third or fourth word lags behind in the animation. The code is using animate() to move canvas elements (via cufon.js) across the screen. Has anyone seen anything similar to this? Any suggestions as to how I can fix
How to pass parameters to jquery functions kept in external file?
Hi, I want to pass some values to jquery function, which kept in external file. Can we pass values to such external functions? and how? Thank you.
Ajax call doesn't hit ASPX Page Method
Trying to call a WebMethod on an ASPX page from jQuery.Ajax call on client. Have seen this done on several web pages and instructionals. Problem seems to be that the actual web method is never 'hit' although the ajax call returns success, all that is in the data returned is the html of the page that made the call. Using VS2010, jQuery 1.8.1 PAGE CODE: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebMethodReturnsDataTableJSON.WebForm1" %> <!DOCTYPE html PUBLIC
Next Page