This is a migrated thread and some comments may be shown as answers.

[Solved] jquery live focus

2 Answers 124 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mattias
Top achievements
Rank 1
Mattias asked on 22 Feb 2011, 05:27 PM
Hi,
I know I can use the onchange event on the textbox but is it possible to add a jquery event outside of the box like:
<script language="javascript" type="text/javascript">
        $('#Width-input').live('focus', function () {
            alert("Hey!!!");
        });
</script>

It seems that telerik events overrides all other scripts cause the alertbox doesn't show up.

Regards,
Mattias

2 Answers, 1 is accepted

Sort by
0
Accepted
Georgi Krustev
Telerik team
answered on 22 Feb 2011, 05:34 PM
Hello Mattias,

 
I noticed from the posted code snippet that you are trying to wire focus method to the hidden input. In this case you should wire focus event to the visible input:

<script language="javascript" type="text/javascript">
        $('#Width-input-text').live('focus', function () {
            alert("Hey!!!");
        });
</script>

Nevertheless I will suggest you to hold this implementation till the next official release of the Telerik Components for ASP.NET MVC because there will be breaking changes in the NumericTextBox components.

Regards,
Georgi Krustev
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Mattias
Top achievements
Rank 1
answered on 22 Feb 2011, 05:37 PM
Thanx Georgi,
Then I lay low for a while! :)
Tags
NumericTextBox
Asked by
Mattias
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Mattias
Top achievements
Rank 1
Share this question
or