jQuery Plugins » text https://jqueryplugins.info jQuery plugins, tutorials and resources Thu, 20 Oct 2011 03:13:49 +0000 en hourly 1 http://wordpress.org/?v=3.2.1 How to select a single text element on a page with multiple forms using JQuery https://jqueryplugins.info/2011/10/how-to-select-a-single-text-element-on-a-page-with-multiple-forms-using-jquery/ https://jqueryplugins.info/2011/10/how-to-select-a-single-text-element-on-a-page-with-multiple-forms-using-jquery/#comments Mon, 17 Oct 2011 22:13:43 +0000 Admin https://jqueryplugins.info/2011/10/how-to-select-a-single-text-element-on-a-page-with-multiple-forms-using-jquery/ Post link: How to select a single text element on a page with multiple forms using JQuery

I have a page with multiple comment boxes. When someone clicks the submit button for the comment box JQuery handles the submission and posts the comment. I then want to...

]]>
Post link: How to select a single text element on a page with multiple forms using JQuery

I have a page with multiple comment boxes. When someone clicks the submit button for the comment box JQuery handles the submission and posts the comment. I then want to set the text in the comment box back to empty. I’m using something like this:

$  ('.formstyle').submit(function() {
    $  .post("/messages/", $  (this).serialize());
    return false;
});

I know there is the .reset() option but that still doesn’t tell me how to access a single text element among many. I can use $ (":input[name=new_message]").val(''); to set the text of all the text boxes on the page but that could be annoying if someone has an message they haven’t submitted. I would think something along the lines of this.(":input[name=new_message]").val(''); would work but no dice. I think I’m just not connecting the dots between this (or more likely $ (this)) and the input selector.

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/how-to-select-a-single-text-element-on-a-page-with-multiple-forms-using-jquery/feed/ 0
Find one tag and remove text https://jqueryplugins.info/2011/10/find-one-tag-and-remove-text/ https://jqueryplugins.info/2011/10/find-one-tag-and-remove-text/#comments Mon, 17 Oct 2011 13:14:52 +0000 Admin https://jqueryplugins.info/2011/10/find-one-tag-and-remove-text/ Post link: Find one tag and remove text

I have the following code. http://jsfiddle.net/CtMmT/4/ Now i need to remove the text from the tag where you can find the “Google must dissappear” text The output for that row...

]]>
Post link: Find one tag and remove text

I have the following code.

http://jsfiddle.net/CtMmT/4/

Now i need to remove the text from the tag where you can find the “Google must dissappear” text

The output for that row must be

<a title="" href="http://www.google.com"></a>.

I tried to select the a tag , but i can’t get only that 1 tag.
I get always, all the a tags .
I tried with the following each loops.
But not with any result.

I can’t set any class on that tag to control so that is not an option.

$  ('ul.menu li.dhtml-menu').each(function() {

}); 

$  ('ul.menu li.dhtml-menu a').each(function() {

});

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/find-one-tag-and-remove-text/feed/ 0
jQuery – get actual position of displayed text inside a text-align:center link? https://jqueryplugins.info/2011/10/jquery-get-actual-position-of-displayed-text-inside-a-text-aligncenter-link/ https://jqueryplugins.info/2011/10/jquery-get-actual-position-of-displayed-text-inside-a-text-aligncenter-link/#comments Sun, 16 Oct 2011 03:14:17 +0000 Admin https://jqueryplugins.info/2011/10/jquery-get-actual-position-of-displayed-text-inside-a-text-aligncenter-link/ Post link: jQuery – get actual position of displayed text inside a text-align:center link?

I have a horizontal menu of links that are styled with fixed width, display:block and centered text. So, while the link (block) itself may be 200px wide, the actual displayed...

]]>
Post link: jQuery – get actual position of displayed text inside a text-align:center link?

I have a horizontal menu of links that are styled with fixed width, display:block and centered text. So, while the link (block) itself may be 200px wide, the actual displayed text may start 25 or 30 px from the left edge, depending on the length of the word in the link. The backgrounds are transparent.

I want to create a new div and line it up with the link that is clicked, NOT with the left edge of the block (which is invisible), but with the left position of the TEXT inside the block.

Is there any way to select the position of the centered text inside the link? Since it’s a part of the “a” element itself, children() doesn’t seem to help…

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/jquery-get-actual-position-of-displayed-text-inside-a-text-aligncenter-link/feed/ 0
Magento :: Translate text from javascript files https://jqueryplugins.info/2011/10/magento-translate-text-from-javascript-files/ https://jqueryplugins.info/2011/10/magento-translate-text-from-javascript-files/#comments Thu, 13 Oct 2011 08:14:02 +0000 Admin https://jqueryplugins.info/2011/10/magento-translate-text-from-javascript-files/ Post link: Magento :: Translate text from javascript files

Magento uses a system for translating text in the template files using: $ this->__('text to be translated.'); or Mage::helper('modulename')->__('text to be translated.');. This works quite well. But when I add...

]]>
Post link: Magento :: Translate text from javascript files

Magento uses a system for translating text in the template files using:

$ this->__('text to be translated.');

or

Mage::helper('modulename')->__('text to be translated.');.

This works quite well.
But when I add text to a javascript file I can’t use these two methods.

Is there a way I could do a similar thing with the translations for javascript files?

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/magento-translate-text-from-javascript-files/feed/ 0
PageFlip For Text Using Jquery https://jqueryplugins.info/2011/10/pageflip-for-text-using-jquery/ https://jqueryplugins.info/2011/10/pageflip-for-text-using-jquery/#comments Mon, 10 Oct 2011 08:18:32 +0000 Admin https://jqueryplugins.info/2011/10/pageflip-for-text-using-jquery/ Post link: PageFlip For Text Using Jquery

Please share any link or your idea regarding how to done pageflip effect for text using jquery? newest questions tagged jquery – Stack Overflow

]]>
Post link: PageFlip For Text Using Jquery

Please share any link or your idea regarding how to done pageflip effect for text using jquery?

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/pageflip-for-text-using-jquery/feed/ 0
How to do a case insensitive search for text within elements using jQuery https://jqueryplugins.info/2011/10/how-to-do-a-case-insensitive-search-for-text-within-elements-using-jquery/ https://jqueryplugins.info/2011/10/how-to-do-a-case-insensitive-search-for-text-within-elements-using-jquery/#comments Mon, 10 Oct 2011 03:23:02 +0000 Admin https://jqueryplugins.info/2011/10/how-to-do-a-case-insensitive-search-for-text-within-elements-using-jquery/ Post link: How to do a case insensitive search for text within elements using jQuery

I have the following basic layout: <div id="container"> <div id="div-a"> <ul id="ul-1"> <li id="li-1-1" class="li"></li> <li id="li-1-2" class="li"></li> </ul> </div> <div id="div-b"> <ul id="ul-2"> <li id="li-2-2" class="li"></li> </ul> </div> <div...

]]>
Post link: How to do a case insensitive search for text within elements using jQuery

I have the following basic layout:

<div id="container">
    <div id="div-a">
        <ul id="ul-1">
            <li id="li-1-1" class="li"></li>
            <li id="li-1-2" class="li"></li>
        </ul>
    </div>
    <div id="div-b">
        <ul id="ul-2">
            <li id="li-2-2" class="li"></li>
        </ul>
    </div>
    <div id="div-c">
        <ul id="ul-3">
            <li id="li-3-1" class="li"></li>
            <li id="li-3-2" class="li"></li>
            <li id="li-3-3" class="li"></li>
            <li id="li-3-4" class="li"></li>
        </ul>
    </div>
</div>

What I’m trying to do is, when an input field gets typed into, it initiates a search of the <li> elements. It does a case insensitive search on all text contained within the <li> elements. The <li> element will contain html such as images links paragraphs etc. When a match is found it returns the <li> ids e.g. li-1-1,li-2-1 etc (whatever is best practice). All this is happening while I type. I plan to get the id’s and clone the <li>. But that shouldn’t be important at this stage.

So far I have the following:

$  ('#my-input').keyup(function(e) {
    e.stopImmediatePropagation();
    var keycode = ( e.keyCode ? e.keyCode : e.which );
    if( keycode == 13 ) {
        //Do something
    } else {
        if( $  ('#my-input').val().length >= 3 ) {

            //code goes here
        }
    }
)}

What is the best way to go about this. I have looked at contains, filter, looping over all .li elements in various ways etc and had no luck so far. Any help would be much appreciated.

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/how-to-do-a-case-insensitive-search-for-text-within-elements-using-jquery/feed/ 0
jQuery / Css – Wrap the text according to fixed width https://jqueryplugins.info/2011/10/jquery-css-wrap-the-text-according-to-fixed-width/ https://jqueryplugins.info/2011/10/jquery-css-wrap-the-text-according-to-fixed-width/#comments Mon, 10 Oct 2011 02:19:39 +0000 Admin https://jqueryplugins.info/2011/10/jquery-css-wrap-the-text-according-to-fixed-width/ Post link: jQuery / Css – Wrap the text according to fixed width

I have a p tag which serve as the label for my images. Currently if the text inside the paragraph is longer than the width of my images, the label...

]]>
Post link: jQuery / Css – Wrap the text according to fixed width

I have a p tag which serve as the label for my images.

Currently if the text inside the paragraph is longer than the width of my images, the label will just “expand” and exceed my image width.

Since my images could be very close to each other, the label become overlapped.

I need some way where i can set the width of the p tag according to the image width, and wrap extra text inside the p tag (bring to the next line).
Any idea how to achieve this by anyway??
Appreciate any help…

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/jquery-css-wrap-the-text-according-to-fixed-width/feed/ 0
jquery template issue in IE7/IE8.03 for function $().text() https://jqueryplugins.info/2011/10/jquery-template-issue-in-ie7ie8-03-for-function-text/ https://jqueryplugins.info/2011/10/jquery-template-issue-in-ie7ie8-03-for-function-text/#comments Thu, 06 Oct 2011 21:14:40 +0000 Admin https://jqueryplugins.info/2011/10/jquery-template-issue-in-ie7ie8-03-for-function-text/ Post link: jquery template issue in IE7/IE8.03 for function $().text()

jquery template object doesn’t support this method in jquery v1.3.2, IE7 $ (“#lblName”).text(“Mike”), lblName is a Label, not a textbox(that’s important) it works when there is no jquery template plug...

]]>
Post link: jquery template issue in IE7/IE8.03 for function $().text()

jquery template object doesn’t support this method

in jquery v1.3.2, IE7
$ (“#lblName”).text(“Mike”), lblName is a Label, not a textbox(that’s important)
it works when there is no jquery template plug in added.
if add jquery template plug-in, it doesn’t work anymore, just get a error “object doesn’t support this method”.
any idea for it?

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/jquery-template-issue-in-ie7ie8-03-for-function-text/feed/ 0
jQuery 1.6.2 Replace Text Not Working https://jqueryplugins.info/2011/10/jquery-1-6-2-replace-text-not-working/ https://jqueryplugins.info/2011/10/jquery-1-6-2-replace-text-not-working/#comments Wed, 05 Oct 2011 14:13:10 +0000 Admin https://jqueryplugins.info/2011/10/jquery-1-6-2-replace-text-not-working/ Post link: jQuery 1.6.2 Replace Text Not Working

I have a bit of jQuery I have been using to set default text in a search box, remove the text when the user enters the search box, and then...

]]>
Post link: jQuery 1.6.2 Replace Text Not Working

I have a bit of jQuery I have been using to set default text in a search box, remove the text when the user enters the search box, and then adds the text again if the search box loses focus. The code is as follows:

//global vars
var searchBox = jQuery("#plc_lt_mpHeaderContent_SiteSearch_txtWord");
var searchBoxDefaultText = "Keyword, Title, Name";

searchBox.val('Keyword, Title, Name');

//searchbox show/hide default text if needed
searchBox.focus(function ()
{

    if (jQuery(this).attr("value") == searchBoxDefaultText) jQuery(this).attr("value", "");

});

searchBox.blur(function ()
{

    if (jQuery(this).attr("value") == "") jQuery(this).attr("value", searchBoxDefaultText);

});

This code is launched in the jQuery(document).ready(function ()). The issue is that this works as expected in jQuery 1.4.2, but when I try the same code in jQuery 1.6.2 it does not work. I am wondering what I need to do to get it to be compliant with 1.6.2. Any help is greatly appreciated.

Thank you

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/jquery-1-6-2-replace-text-not-working/feed/ 0
jQuery – Hiding text https://jqueryplugins.info/2011/10/jquery-hiding-text/ https://jqueryplugins.info/2011/10/jquery-hiding-text/#comments Tue, 04 Oct 2011 19:13:14 +0000 Admin https://jqueryplugins.info/2011/10/jquery-hiding-text/ Post link: jQuery – Hiding text

I have the following code and trying to hide XYZ. Why isn’t it getting hidden using this code? <html> <head> <script type="text/javascript"> $ (function(){ $ ('#hide').hide(); }); </script> </head> <body>...

]]>
Post link: jQuery – Hiding text

I have the following code and trying to hide XYZ. Why isn’t it getting hidden using this code?

<html>
<head>
<script type="text/javascript">
        $  (function(){
               $  ('#hide').hide();
    });
</script>
</head>
<body>
<div id="hide">
XYZ
</div>
</body>
</html>

Thanks.

newest questions tagged jquery – Stack Overflow

]]>
https://jqueryplugins.info/2011/10/jquery-hiding-text/feed/ 0