Basically looking for a JQuery plugin with better Android browser support than JQTouch. Or even an alternative Javascript framework with better mobile support.
Hallo all.
I need to set a maximum widht to a label tag and avoid the text overflow with jquery.
Is there an elegant way to do it?
Kind regards
Massimo
When I use
$(document).ready(function() {
var bodyHeight = $("body").height();
console.log(bodyHeight);
});
I get a really wack number for body height. I then run
$("body").height();
in the console and get the right height. Something seems fishy about the $(document).load doing this... Yes my CSS works fine and all, so is this my bug, chromes, or jQuery's?
I want to replace a form element with a div and keep the inner html of the form inside the inserted div element. i tried jquery it gives me unkown html element as selection result,
below is the target form and inner html:
thank you .
I use jquery blockUI plugin (v2) and call $.blockUI when user submits a form. Web page smoothly fades out and new page appears. That's ok. But when user presses "back" button in opera/fire fox he observes fade out page with hourglass mouse cursor that is completely blocked.
Chrome/IE visualize page ok.
What would you suggest?
Thank you in advance!
I have found many ways to measure width and to truncate text using jquery, but I can't find one based on height.
I am limited to two lines of text or it will knock my design out of canter.
So does anyone know a method of limiting a paragraph to two lines high, tuncating it and adding an elipse ?
I'm a noob with jQuery...and I hope I've explained this well enough; I have a <ul> header that appears when I've added an entry to a dynamically created list using $.post. Each entry added has a delete/edit button associated with it.
Header is this:
<ul class="header">
<li>Month</li>
<li>Year</li>
<li>Cottage</li>
</ul>
My dynamic list that is created:
<ul class="addedItems">
<li>Month</li>
<li>Year</li>
<li>Cottage</li>
<li><span class="edit">edit</span></li>
<li><span class="del">delete</span></li>
</ul>
This all looks like this:
Month Year Cottage <--this appears after I've added an entry
-------------------------------- and I want it to stick around unless
all items are deleted.
Dec 1990 Fir edit/delete <--entries
Jan 2000 Willow edit/delete
My question is: Is there some kind of conditional that I can use with jQuery to hide the class="header" if all the items are deleted? I've read up on conditional statements like is and not with jq but I'm not really understanding how they work. All of the items in class="addedItems" is stored in data produced by JSON.
This is the delete function:
$(".del").live("click", function(){
var del = this;
var thisVal = $(del).val();
$.post("delete.php", { dirID : thisVal },
function(data){
if(confirm("Are you sure you want to DELETE this entry?") == true) {
if(data.success) {
//hide the class="header" here somwhere??
$(del).parents(".addedItems").hide();
} else if(data.error) {
// throw error if item does not delete
}
}
}, "json");
return false;
}); //end of .del function
Here is the delete.php
<?php
if($_POST) {
$data['delID'] = $_POST['dirID'];
$query = "DELETE from //tablename WHERE dirID = '{$data['delID']}' LIMIT 1";
$result = $db->query($query);
if($result) {
$data['success'] = true;
$data['message'] = "Entry was successfully removed.";
} else {
$data['error'] = true;
$data['message'] = "Item could not be deleted.";
}
echo json_encode($data);
}
?>
I have an object that I want to send with my jquery.ajax function but I can't find anything that will convert it to the serialized format I need.
$.ajax({
type: 'post',
url: 'www.example.com',
data: MyObject,
success: function(data) {
$('.data').html(data)
}
})
MyObject = [
{
"UserId": "2",
"UserLevel": "5",
"FirstName": "Matthew"
},
{
"UserId": "4",
"UserLevel": "5",
"FirstName": "Craig"
}
]
I have a fair knowledge about Javascript, I started with jQuery 1.4 a week back and I have gone through some examples. It's very interesting to use it with my application. But my concern is, should I care about previous versions? Should I know what the downsides are of the previous version?
Consider these jquery statements...
$(document).ready(function() {
getRecordspage(0, itemsPerPage);
$(".pager").pagination(maxNumberOfElementsHere, {
//my def
});
});
I get the value for maxNumberOfElementsHere from getRecordspage function... How to pass that value from getRecordspage function to the next one $(".pager").pagination(maxNumberOfElementsHere.... Any suggestion...
Hi All, I tried to ask this question on the jquery tools forum, but didn't get a response, hopefully someone here can help.
Question:
It seems the onClick event does not get fired when user is already on current tab, I think that make sense for most cases. However, in my case, I do want to capture the onClick event even when the curent tab is already the selection.
Is there a way to do this?
Thanks!
My problem is this: I need to update some text in a div with the value of what the mouse pointer is hovering over in the autocomplete drop down list.
Can it be done easily, or do I have to make fundamental changes to the Autocomplete plugin?
I am using the jQuery Autocomplete plugin version 1.1 by Jörn Zaefferer.
Any and all help will be greatly appreciated!
Hi,
I have seen many resources on using jQuery with rails where people recommend having callback functions in .js.erb files, however I have also heard that passing data this way leaves me vulnerable to man in the middle attacks. Is this true? What are the security concerns and is there a way to do it safely?
Thanks
I am using json data and iterating it through jquery and displaying my results...
Using var jsonObj = JSON.parse(HfJsonValue); works in firefox but not in IE6....
HfjsonValue is a json string which is returned from my aspx code behind page... SO i dont use ajax... Any suggestion to get my json parsed better and cross browser one...
Hi,
Ive got this in an XML file that i parse with JQuery.
<title>Lång</title>
I'm using .text() for pulling out the text, but it's wrong encoded.
How do I get it encoded to proper text? I want 'Lång' out of it.
Is it a good idea to learn JavaScript before learning a JavaScript framework library such as jQuery, Prototype, etc.?
Sometimes I find myself struggling because I feel I don't know JavaScript as well as I should.
I'm wondering why opacity animations only work with Firefox, and not with chrome or internet explorer.
For example,
jQuery("#a").fadeTo(1000,1);
fades the element in with firefox, but just makes it appear with Chrome or IE. All I want is for the element to fade in.
How can I get this to work with IE and chrome?
Edit: Same thing if I use fadeIn() or any other similar function, like show()
I have a link, which links to domain.com , when a person clicks, I want it to do an ajax call to counter.php and post 2 variables to it, so it can add 1 to the views for that link.
I have a link:
Link Title
How would I do this with jquery?
I used jquery stepcarousel plugin for my gallery in my application it works but what happens is when i navigate through images i can see new image flickers for few seconds and then shows up.... Any tips to avoid it....
How do I disable the backspace button when input checkboxes are focused on in jQuery? When checkboxes are focused on and I press backspace (keycode=8) the browser thinks I'm trying to go back a page and uses backspace as a history.go(-1) command.
I am trying to use the jQuery SimpleModal plugin and I am curious about something: The description page mentions a "container" div. What is the purpose of this? Do I need to use it to use the plugin?
I am using Jquery Accordion. The active link has an outline.
I have tried using css:
#accordion a:focus
{ outline: none; }
#accordion a:active
{outline: none; font-weight:bold;}
and also
#accordion a:-moz-any-link:focus
{ outline: none; }
None of these seem to work. Can anyone advise a setting or another option to remove the dotted outline around the active links?
Mobile browsers.
Jquery dialog alert box.
I don't want to use alert() because it looks ugly in web browsers.
I'm building a website for BOTH mobile and web, so I need a dialog box that can work on both.