i'm using this script http://jqueryui.com/demos/autocomplete/#default with database. i want to highlight typed words like this: www.docs.jquery.com/Plugins/Autocomplete. Please help me.
I am using jQuery's thickbox.js pluging, for a modal dialog box that will appear when some one first loads the website(as a welcome banner), and after clicking on "enter site" they should be logged in to my home page.
But the problem is "Modal dialog box appear's to be empty in some system(i.e OS), with same configuration, and shows only the loading progress bar". it works in some system only.. please help to find the problem??
Some of the tutorials and examples I have seen for developing jQuery plugins tend to return
this.each(function () {
});
at the end of the function that instantiates the plugin but I have yet to see any reasoning behind it, it just seems to be a standard that everyone follows. Can anyone enlighten me as to the reasoning behind this practice?
I have some code like this
function doSomething(){
Jquery.ajax(type: "POST",
url: "HelloWorld",
success: function (msg) {
if(msg.d =="Hello World")
{
return true;
}else
{
return false;
}
}
);
}
i want to know something based on which the return value of the succes function.
Can somebody help?
I am using simple jQuery
$.get( .... );
Here instead of getting GET response I get OPTIONS.( checked in firebug Net)
Same code is working fine in Safari. Looks like some problem with Firefox.
Any workaround / solutions to fix this problem..
Thanks
Kurund
I'm using the great (IMHO) jQuery Address plugin but it's been driving me insane since I didn't know that it automatically tracked the pages on Google Analytics.
How do I keep it from doing it?
I tried this but apparently it's never called.
$.address.tracker(function(){console.log("hello")})
I guess I could somehow overwrite the function in the plugin but I hope there's a better way...
How can I detect whether or not an input box is currently a jQuery UI autocomplete? There doesn't seem to be a native method for this, but I'm hoping there is something simple like this:
if ($("#q").autocomplete)
{
//Do something
}
That conditional, however, seems to always return true.
Hi,
I'm just wondering how can I display both individual error messages and summary for the jquery plugin, I actually found a similar question but it just reference some hooks I can use, but I'm not sure where to start,
I got the displaying individual error messages part, but I need to display the summary in an alert box on submit, plugin can be found here
Let's say I have a custom AddMethod to jQuery Validate like:
$.validator.addMethod('min-length', function (val, element) {
// do stuff
// the error message here needs to be dynamic
}, 'The field cannot be less than than '
+ element.attr('data-min') + // it is within the closure, but it can't grab it
' length.');
I can't figure out a way to get the element variable in question, and get any values from it. What am I missing here?
if i have this code in jquery:
var parentDiv = $(this).parent('.copyInstance');
inside this div there is a form.
how do i reference a form element inside this selector? i want something like this
$.post($(parentDiv + " Form").attr('action'), $(parentDiv + " Form").serialize(), function(data) {
});
but this above doesn't seem to work
A have a large div (a map) that is draggable via jQuery UI draggable. The div has child divs which are clickable.
My problem is that if you drag the map, on mouse up, the click event is fired on whatever child div you started the drag from.
How do I stop the mouse up from triggering the click event if its part of a drag (as opposed to someone just clicking without a drag, in which case the click event is desired).
Hello All,
I have slight problem with Google maps included in simple jQuery Tabs.
Below I pasted the code:
jQuery:
$(document).ready(function() {
//Default Action
$(".tab_content").hide();
$("ul.tabs li:first").addClass("active").show();
$(".tab_content:first").show();
//On Click Event
$("ul.tabs li").click(function() {
$("ul.tabs li").removeClass("active");
$(this).addClass("active");
$(".tab_content").hide();
var activeTab = $(this).find("a").attr("href");
$(activeTab).fadeIn();
return false;
});
});
Here is the HTML for the tabs:
<div class="bluecontainer">
<ul class="tabs">
<li><a href="#tab1">Tab1</a></li>
<li><a href="#tab2">Tab2</a></li>
<li><a href="#tab3">Tab3</a></li>
<li><a href="#tab4">Tab4</a></li>
</ul>
<div class="tab_container">
<div id="tab1" class="tab_content">
<h2>Tab1</h2>
</div>
<div id="tab2" class="tab_content">
<h2>Tab2</h2>
</div>
<div id="tab3" class="tab_content">
<div>google Map</div>
</div>
<div id="tab4" class="tab_content">
<h2>Tab4</h2>
</div>
</div>
</div>
I really don't know what to do to. Is that a general problem with google maps or there is something with my tabs? But they are working just fine with everything else.
Thank you for your help in advance
Hello,
I have recently jumped into the world of JQuery. I saw the methods find() and filter() but can not figure out the difference between the two.
What exactly is the difference between the two?
Hello all.
I've done some experimenting, but can't seem to successfully bind one event handler to multiple elements using jQuery. Here's what I've tried:
$('selector1', 'selector2').bind('click', function() {
$('someSelector').removeClass('coolClass');
});
I've tested all my selectors, and they are all valid.
Is what I'm trying to do even possible? If so, can I do it with .live() as well?
Thanks!
I am trying to calculate the innerwidth of jquery dialog (ui-1.8)
For somereason it is always returning 0. One reason perhaps is that the dialog is still hidden and not open??
Was using
$('#dialogId').innerwidth()
Any help?
Hello Everyone,
I have anchor tag
<a id="click" href="javascript:void(0);" onclick="disable();" style="">Clickme</a>.
When html loads it showing clickme,when i click anchor link,it calls disable() function,In disable function i am trying to hide it using below code within the jquery success function:
document.getElementById("click").style.display='none';
But page never hides that anchor link,Please let me know if i am doing anything wrong.
Thanks in advance.
Hi, I'm making a plugin and one of the options is a standard callback. I want the user to be able to re-run the jQuery plugin's this.each() which basically re-runs the plugin, for example;
callback: function(){
// some code to rerun the plugin here after 10 seconds
}
I know I can do this like so: $(this).plugin_name(); but it won't contain any of the options I've specified.
Any help would be appreciated.
how to combine the error message from jquery validation. for example:
messages: {
first_name: { required: "Please enter your first name." },
email: {
required: "Please enter a valid email address.",
remote: "Email has been registered."
},
username: {
required: "Please enter username.",
remote: "Username has been registered."
}
},
Desired message will be like this:
Please enter your first name, a valid email address and username
or
Please enter your first name and username, email has been registered
etc.
jQuery Class selector works well if you have a single class assigned to an element. What if I assign two classes to an element(Ex: <div class="one two">), how can I find that element if I know these two classes?
I'm having issues with my JQuery Ajax Call. The response is always null because the callback function is executed before the request to get_friends is completed. Is there anything I'm missing? Thanks in advance.
$('#btn_update').click(function() {
url = '/get_friends/';
$.get(url, {}, function(response){
alert(response);
});
});
I'm using the jQuery Validation JS
I have two contact forms, the main one that appears on one page only, and a quick-contact that is on all pages.
How can I prevent quick-contact form to show the error messages ONLY on submit (without effecting the other form)
Hi,
I am trying to make a script that updates the captcha image, that is loaded through live() function... It works, but it only updates the image 1 time on firefox, 2 times on safari... How can I make this to work multiple times?
jquery 1.4.2
relevant part of code:
/* captcha image change */
var rand = Math.random();
$('a.captcha_refresh').live('click', function() {
$('img.captcha').attr("src", 'captchashow.php?sid=' + rand);
});
thanks,
brm
I was unsuccessful in finding a jQuery plugin that allowed me to write in two inputs simultaneously.
I'm trying to write a normal title in one field, and at the same time type in another input write the same text without special characters or spaces.
e.g.
Input 1: This is my Title!
Input 2: ThisIsMyTitle