Hi,
When I set my jQuery dialog to model=true, it disables my form elements inside the dialog and I cannot use them, only the buttons.
I have seen examples where the contents of the dialog is declared in the dialog initiation script and then injected. but that is just to bulky for me, I want to be able to create my markup inside the DIV which I turn into a dialog.
Anyone got a solution for me?
Hi,
I have a website that changes his inputs ids, and I'm trying to make a semi auto-login, filling automatically the email and the password part...
I'm doing this with greasemonkey and jQuery...
I'm trying something like this
$("input[@type=text]").setValue("[email protected]");
but had no success...
The Page has only the login part, two text type inputs...
What am I missing here?
Has anyone had any experience with using jTemplates to display autocomplete results.
I have the following
$("#address-search").autocomplete({
source: "/Address/SearchAddress",
minLength: 2,
delay: 400,
focus: function (event, ui) {
$('#address-search').val(ui.item.name);
return false;
},
parse: function(data) {
$("#autocomplete-results").setTemplate($("#templateHolder").html());
$("#autocomplete-results").processTemplate(data);
},
select: function (event, ui) {
$('#address-search').val(ui.item.name);
$('#search-address-id').val(ui.item.id);
$('#search-description').html(ui.item.address);
});
and the simple jtemplate holder:
<script type="text/html" id="templateHolder">
<ul class="autocomplete">
{#foreach $T as data}
<li>{$T.name}</li>
{#/for}
</ul>
</script>
Above i'm using 'Parse' to format results, I've also tried the autocomplete result method but not having any luck so far. The only success I've had is by using the private method ._renderItem and formatting the data that way but we want to render the output using the jTemplate.
Any advice appreciated.
I have read this.
http://stackoverflow.com/questions/2048485/jquery-checkbox
<input type="checkbox" name="checkGroup" id="all">
<input type="checkbox" name="checkGroup" id="one" value="1">
<input type="checkbox" name="checkGroup" id="two" value="2">
<input type="checkbox" name="checkGroup" id="three" value="3">
<input type="hidden" name="storeCheck" value="">
$(function(){
$("#all").click(function(){
$("input:checkbox[name='checkGroup']").attr("checked",$(this).attr("checked"));
});
$("input:checkbox[name='checkGroup']:not('#all')").click ( function(){
var totalCheckboxes = $("input:checkbox[name='checkGroup']:not('#all')").length;
var checkedCheckboxes = $("input:checkbox[name='checkGroup']:not('#all'):checked").length;
if ( totalCheckboxes === checkedCheckboxes )
{
$("#all").attr("checked" , true );
}
else
{
$("#all").attr("checked" , false );
}
});
});
Demo
I am trying to get the value of the checkboxs are checked as an array.
for example
if I checked All
Get value array_check = 1,2,3 and passed this array to hidden name="storeCheck"
otherwise:
Get value of array_check( checkboxs checked ).and passed this array to hidden name="storeCheck"
The following code
stringref = "tab_2";
jQuery('.someclass a:not(.someclass #a_someclass_'+stringref+')').css('color', '#000');
gives me this warning in the FF 3.5.5 error console and I can't figure out why:
Warning: Missing closing ')' in negation pseudo-class '#a_someclass_tab_2'.
Is my syntax failing me or has FF gone bonkers ?
not an expert programmer.
i created this code to resize photos/images to fit the screen, considering the space available for the nav bar.
the script happens on load of image, and on click of the navigation. is it a good piece of code, or could it be done better? any browser issues?
in the html:
$(document).ready(function(){
$("#photo").load(function(){
resize();
});
$(".navigation img").click(function(){
var imgPath = $(this).attr("src");
$("#photo").attr({ src: imgPath });
resize();
return false;
});
});
while this is my function resize:
resize = function() {
var borderVt=150; //value based on css style. bottom bar + padding of photoContain
var borderHz=40; //value based on css style photoContain padding
$("#photo").css("width", "auto").css("height", "auto"); // Remove existing CSS
$("#photo").removeAttr("width").removeAttr("height"); // Remove HTML attributes
var origSizeW = $("#photo").width();
var origSizeH = $("#photo").height();
var ratioVt=(origSizeW/origSizeH);
var ratioHz=(origSizeH/origSizeW);
var winW = $(window).width();
var winH = $(window).height();
var screenSizeW=Math.round(winW-borderHz);
var screenSizeH=Math.round(winH-borderVt);
if (origSizeW>=origSizeH){
var newHeight = Math.round(screenSizeW*ratioHz);
if (newHeight <= screenSizeH){
$("#photo").css("width", screenSizeW); // Set new width
$("#photo").css("height", newHeight);
}
else{
$("#photo").css("height", screenSizeH);
}
}
else{
$("#photo").css("height", screenSizeH); // Set new height
}
};
Dear community,
I just want to have my question posted here but just from the beginning:
For a personal web project I use PHP + JQuery.
Now I got stuck when I try to use the ajax posting method to send data to another php-page. I planned to have some navigational elements like next + previous on the bottom of the page by saving the user input / user given data. The code looks as follows:
<div id="bottom_nav">
<div id="prev" class="flt_l"><a href="?&step=<?= $pages[$step-1] ?>">next</a></div>
<div id="next" class="flt_r"><a href="?&step=<?= $pages[$step+1] ?>">previous</a></div>
</div>
The functionality of the page works fine. Lateron, I use the following code to sent data over via POST:
$("#bottom_nav a").click( function() {
alert("POST-Link: Parameter=" + $("#Parameter").val());
$.ajax( {
type:"post",
url:"saveParameter.php",
data:"Parameter=" + $("#Parameter").val(),
success: function(result) {
alert(result);
//$("#test").text(result);
}
});
});
The request itself work perfectly on IE, but on FF I'm not able to get back any result.
within the PHP page, there just written:
<? echo $_POST['Parameter']; ?>
As IE returns the correct value, FF just provide an empty message box. I assumed that the behaviour on the -Link is different. While IE seems to handle the clickevent after the JS-Code execution, FF will interpret it before.
My question was whether you has a solution on this regarding restructuring the code itself or using another method to reach the intened behaviour.
Thanks for your assistance and recommendations,
Olli
when using the jquery ui autocomplete, i would thought there would be an option to force only valid key entry based on the list. Is there anyway to not allow invalid keys so you can only enter valid items in the list?
if my list has (csharp, java, python)
i can start typing "abcds . ." and it lets me type it in. I want only valid entries to be allowed.
I have a navbar, a ul with the id of menu that I want to turn into a dropdown menu. There are uls in each li, and each ul has the class sublist, which in the CSS has a display value of none, but with the jQuery below even though I hover over it, the ul won't show. I'm 12 and what is this?
$(document).ready(function(){
$('#menu li').hover(function(){
$('.sublist').slideDown(200);
});
});
I'm trying to adjust a jquery script to my needs and encountered the following lines-
arguments.callee.eabad1be5eed94cb0232f71c2e5ce5 = function() {
_c3();
_c4();
return;
};
what is it?
I've heard of Qtip, and it looks good for what I want to use. Is this the most common one? Are there any other jquery tooltip plugins that people recommend? I want to pop up a bubble with images and formatted text.
Hello , i'm trying to validate credit card numbers with jQuery but i dont want to use the validation plugin , is there any other plugin for doing this?
thanks
Hi.
I want to validate names into forms using the Google search API and JQuery, for sure I need the JSON's responses from Google to do it.
I got this idea, but it's reliable?.
It's just an idea, but what you think about?.
Hello, I have a GridView and a asp:TextBox containing a Number. The
GridView also contains cells with numbers (one in each row). I want to know wether a
cell contains this number and if so, the whole row has to be removed.
I want to do this via jQuery.
I have application that brings response via Ajax and creates 5-20 new jQueryclick listeners on each refresh. Both IE and mozilla browsers seem to be slowing down with usage. Can this slow down browser performance significantly. Can listeners be "released"?
I am trying re-create the facebook tagging functionality, where you click on an image and the part of the image you click on displays an empty box (or a square).
Using jQuery, how do I make the box appear around my cursor on the click?
Thanks
I'm using the jQuery validation plugin to validate a form, and I'd like to remove the validation and submit the form if a certain link is clicked.
I am submitting form with javascript like jQuery('form#listing').submit(), so I must remove the validation rules/function with javascript.
The problem is that I can't figure out how to do this. I've tried things like jQuery('form#listing').validate({}); and jQuery('form#listing').validate = null, but with no luck.
It seems to me that jQuery doesn't seem to be written as an OOP framework, it seems too short, and not verbose enough for that. Am I right in thinking this and if it isn't written as OOP, then what methodology are they using?
Can someone tell me how to install this? I go here: http://api.jquery.com/browser/ and click the INSTALL NOW button. After that it says "Download and open the AIR file to begin the Installation". I have AIR installed but can't figure out where the file is for the API Browser.
I'm definitely missing something obvious...
<div id="myDIV">
<div>
<span>
<a href="#">Seek me!</a>
</span>
</div>
</div>
How can I find a tag with myLink id using jQuery selector (not looping through children())
If I know only myDIV id
I am trying to just add a reference to jquery in my ASP.NET project, and get this when I do: "Error updating JScript IntelliSense ... Object doesn't support this property or method."
I read that I may have to reference vsdoc, but can someone help me with this?