I'm new to jquery, i write a simple snippetto toggle menu . But the problem is : when I scroll at the bot of page and click menu to toggle. It go top unexpectedly .
Thanks for reading .
I need a jquery script section that checks to see if the first digit of a textbox entered number string is a '0' and eliminate it if so. For example "044055" needs to become "44055"
will we have to replace every $ with jquery?
$(document).ready(function() {
$('.tabs a').click(function(){
switch_tabs($(this));
});
switch_tabs($('.defaulttab'));
});
function switch_tabs(obj)
{
$('.tab-content').hide();
$('.tabs a').removeClass("selected");
var id = obj.attr("rel");
$('#'+id).show();
obj.addClass("selected");
}
hi i need to populate a drop down list when i select a certain value ,
and the options need to be queried from the database ..
can i achieve this from jquery ?
if i can then please i would appreciate any help..
I have a following event handler which worked in jquery 1.3.2 but stopped working when we upgraded to 1.8.2, still fired but doesn't do anything
$('input.maskedInput').focus(function () {
$(this).mask("999-999-9999");
}).blur(function () {
$(this).unmask();
var numbers = $(this).val().replace(/-/g, '').replace(/_/g, '');
$(this).val(numbers.toString());
});
What could be a problem?
I'd like to be able to use jQuery to trigger an event if the mouse has been stationary for a certain amount of time.
Any ideas? I'm not even sure where to start!
I'm new to jQuery and really liking it. I'd like to know if there's an effect similar to IE's in which I can convert images to grayscale in the runtime?
I am using jQuery, I want to check existence of an element in my page. I have done following code, but its not working?
if ($("#btext" + i) != null){
//alert($("#btext" + i).text());
$("#btext" + i).text("Branch " + i);
}
Please tell me what will be the right code?
Thanks
Hi
I am using jquery and I got a couple plugins that don't offer a minified version. So I want to take the full version and minfiy it but all the sites I have found that you input your javascript and it minifies it breaks the plugin.
Like it must strip something out because I get a syntax error.
So anyone got a good one that I can use?
Is there any place where I can find JQuery video tutorials from novice level to master level? The books I saw mostly assume you are very familiar with CSS syntax. If there is any video tutorial resource for CSS, that would be awesome too.
Hi guys, I used jQuery tools to create a tabs setup, and I would like to incorporate the fade effect, but when I try to do so, it bombs out, here is my code:
$(function() {
$("#flowtabs").tabs("#flowpanes > div", { history: true, effect: 'fade' });
});
I am assuming that it's because I am also enabling the tabs history?
I am kinda new to all of this, so please be patient! :-)
Thanx in advance!
I recently came across this jQuery plugin to include external JS and CSS files into a page. Although its release in early 2009 but there're NO references in blogs or elsewhere. I wonder if its usable? Anyone here use it before?
I love the new live event in jQuery 1.3. The question I have is the performance of this event. I know the advantages of using live over click/bind('click') but is there a performance hit for using it over click/bind('click')?
If not, why would you ever use click or bind('click')?
Hi,
How do I auto-resize the input type="text" field with jQuery? I want it to be like 100px wide at the start, then make it auto-widening as user inputs text... is that possible?
I have a text area in which users can type source code (html/css/js). I want to be able to let them click a "switch to fullscreen" link to make the editor fullscreen.
Of course, this should work on any resolution and must also resize when a users resizes it's window.
I found this plugin, http://plugins.jquery.com/project/fulltextarea, but it's not resizing when the browser windows is resized.
Any tips or plugins for this one?
I want to throw an error message if user doesn't input any value for a particular field. I am using blur event. I don't want to use ALERT function for throwing error messages. What are the other options we have available in jquery for error handling?
Hello,
I would like to pass to a jQuery function a regular function, instead of the usual anonymous function, but I'm not sure how such a thing could be done.
Instead of this:
function setVersion(feature) {
$.post("some.php", { abc:"abc" },
function(data){
// do something here
}, "json");
}
I would like to do this:
function foo(data){
// do something here
}
function setVersion(feature) {
$.post("some.php", { abc:"abc" }, foo, "json");
}
Thank you.
hi,
I'm using qTip jquery-plugin for my tooltips.
I cannot change the font-size of the tooltips. This is the code.. any number 2..4..8 produces the same results.
$('.option img[title]').qtip({
style: { name: 'light', border: {width: 0}, title: { 'font-size': 2 } },
position: {
corner: {
target: 'topMiddle',
tooltip: 'bottomMiddle'
}
}
});
thanks
Hi folks. I was kindly helped by fudgey earlier. Unfortunately the solution doesn't work in IE. Here is the original post:
http://stackoverflow.com/questions/2768141/expand-div-with-focus-jquery
and here is his demo (also doesn't work in IE):
http://pastebin.me/6561cd9a033a5f16940ae12f813e938c
Any idea on how to make this work there?
Thanks!
I have this element:
<div class="isthisyou" id="unique_identifier"></div>
I want to use jQuery to insert a link into the div:
$('isthisyou').append('<a href="auth/create_account/'+this.id+'">Is this you?</a>');
Right now this.id is returning undefined instead of unique_identifier. What am I doing wrong?
Thanks!
I have jquery validator running and I the page is so long, so I want the page to scroll up to the top because I display errors on the very top of the page above the form, doesn anyone know where I can put the code for the animation so it fires when the form has errors ?
I have just stared using jQuery and although following code gets the job done, I have a feeling that it can be shortened.
var accountAddress = $(document.createElement("input")).addClass("readOnly").attr("contentEditable", "false").attr("id", "d_accountAddress");
$("#customerid_c").next().next().next().append(accountAddress);
If it is not clear - what I'm doing is creating new input tag, assigning class and making it readonly, then positioning new input two TD's to the right of some known text.
I noticed that the following JQuery code doesn't run on the page load, but instead, it only runs after the page loads and I change the size of my browser window.
$(window).resize(function() {
... // dynamically set the height of some div based on the browser viewpoint height
});
Question: How do I get the code above to also run when the page loads?
I used this code to get the perticular column value using jquery..
$("#Grid td:first-child").click(function() {
var resultArray = $(this).closest('tr').find('td').text();
alert(resultArray);
});
How to get the peticular column value? that is I need grid 4th and 5th column value?
thanks
Hi,
I'd like to know what are the most useful JQuery plugins. I'm particularly interested in those which are likely to be useful in general UI development, such as Tablesorter, rather than those which serve uncommon needs.
If you could provide a very brief description of the plugin's purpose, that would be really helpful.
Thanks,
Don