var gunboxwidth = ($('h2 span').widest().width() + "px" + 30 + "px")
.widest() grabs the wides span inside of an h2, the problem i'm having is that it works fine when i DO NOT have
+ 30 + 'px'
why is that? is my syntax wrong?
...
Hello all
As the title says, I want to truncate user-input text string based on the width and height of a designated container. My specification is to truncate the string, display some message like Read More at the end and when user clicks on it, the text slides down.
UPDATE: Ah! Forgot one thing. It should handle multi-byte characters...
I am having links like:
<asp:HyperLink ID="lnkTitle" runat="server" CssClass="itemTitle" >
</asp:HyperLink>
<a id="linkOwner" runat="server" class="authorName"></a>
I am assigning the NavigateUrl from code behind at run time like:
lnkTitle.NavigateUrl = "MyPage.aspx?id=" + userID;
linkOwner.HRef= "M...
i am using a thick box for flv player, when we click on the link for video (these videos list coming via AJAX), large size of videos are not playing, i think it is buffered, how can play the large videos? i am using flv player downloaded from www.adobe.com.
...
I can't understand how to increment a value of the table cells like: 1,2,3 etc?
My code:
$('#table').each(function(i){
$(this).find('td:nth-child(1)').text(i);
});
Please, look at the full example
...
Hello
Some is bugging my mind lately, a website I develop has an ability to add new rows to the table via javascript and each time I add a row I have to apply plugins to each row as such:
Assuming .data is my table id:
$('.data tbody tr').each(function(idx) {
$("input:text", this).setMask();
$(this).bindTooltip();
syncRowSt...
I'm using cookie plugin with jquery. I set cookie like $.cookie('key','value'). In firebug I can see that the cookie is set but console.log($.cookie('key')) returns null.
What am I doing wrong ?
...
is possible to get last day's visits google analytics with jquery or ruby?
thanks
...
Recently i had gone through Scottgu's Blog where he had jotted of Jquery Templates i would like to know when and where to use these templates and where it should not be used. It would be very great of you, if you come forward with some simple examples.
...
There are loads of questions and answers regarding the issue of posting arrays back to the server using jquery.
However I cant seem to find any solutiion to the problem I'm having. Basically the code below should return an array of ID's back to the server:
I know the array contains items as the length of the array always matches the nu...
Hey there,
I've been working for a bit on this code, making in function just as I'd like it, but in the end I guess I missed something pretty big: the files don't seem to be uploading. The progress bar has been perfectly tweaked, the dialog box works well, just no files are being uploaded.
What's going on?
My Javascript:
fileCou...
Hi again!
I have a what i would call a stange problem, though its to do with internet explorer (7 8 in both normal and compatability modes) so is not that strange to have a problem!!
I have created a page break system.
there are buttons on the page [previous] [next] [show all] / [show as pages]
when the buttons are clicked it uses an ...
I am looking to add comet long polling functionality to my site by using ajax and jquery as I am not familiar with the javascript prototype framework. However, when I search for this, I always seem to end up with tutorial which use the prototype framework. Does anyone know of any comprehensive tutorial for comet long polling based on j...
Hi, I have the following code:
function loadTweets() {
$('#mainForm').submit(function(){
return false;
});
$('#send').click(function(){
$('#tweets').html('');
var searchTerm = $('#search').val();
var baseUrl = "http://search.twitter.com/search.json?q=";
...
I have the following code for a menu system which includes a lot of parts which are common in every menu item.
I'm struggling to put the common code into functions which I can then call as needed - so I don't need to have hundreds of lines of identical code.
Can anyone help point me in the right direction?
$("#test1").hover( function(...
My Jquery code
function nalozi() {
var id_skupine = $('#skupina option:selected').val();
$('#artikel option').remove();
//$('#artikel').append('<option value="'+id_skupine+'">'+id_skupine+'</option>');
$.getJSON('artikli.php', {id_skupine:$('#skupina').val()}, function(data) {
$.each(data, function(index,item) {
$("#a...
Hello.
I'm trying to manually set throbber on TinyMCE editor using jQuery plugin. Tried like that:
$('textarea.tinymce').tinymce().setProgressState(1);
but no luck - Firebug says only:
1
and nothing happens. setContents() works just fine. How to show/hide the throbber?
...
Hello all,
I hope you can help solving my problems. Any help is much appreciated. Thank you in advance.
HTML&CSS:
I tried creating a 'linklist' with HTML and CSS which you can find in this fiddle.
Unfortunately and logically the 'linklist' displays by hovering over the link 'Linklist', by leaving the link there won't be any display.
...
Ever since JQuery came along a few years ago I've been using it in all my client-side scripts. Initially I used the '$() syntax to grab and manipulate objects this, to me, is the 'old skool' paradigm of explicitly wiring up button events to functions:
<button onClick='myFunction(this);' ... />
with a related function:
function myFun...
Hi,
I have a set of nested DIVs that slidetoggle using jQuery as the user clicks on them.
Inside the innermost DIV there is an anchor tag with an HREF that should navigate somewhere.
The problem is that when I click on the link it slidetoggles just like the parent DIVs instead of navigating to the url.
If I right click the anchor and sel...