0

When navigating and refreshing the page via AJAX I get the error: Uncaught TypeError: Object #<Object> has no method 'slider'

Strange this is that if you go directly to the page the price slider function on the left bottom does work.

I read this may be because of a jQuery version conflict, so I added a test:

console.log("VERSION OF JQUERY:"+jQuery().jquery);

That returns 1.10.2

I would think just the latest version is available.

I tried adding noConflict(), before this line:

$("#slider_pricefilter").slider({

But then a whole chain of other errors is triggered, consisting of Uncaught TypeError: Property '$' of object type errors throughout all my jQuery code.

What can I do to fix this?


Enabling/Disabling Button based on the validation of the text box is not working

I have a WPF user control containing the textbox and the button. The textbox has the validation rule associated(which executes some business rule. This class implements ValidationRule). The button needs to be enabled/disabled based on the textbox validation result.

The validation of the textbox is happening properly.

The enabled/disabling of the button is not happening properly. Once the button gets enabled, it does not get disabled even if the validation of the textbox results in error.

      <TextBox MaxLength="3" Width="40" Margin="5" x:Name="Text1" HorizontalContentAlignment="Center">
                <TextBox.Text>
                    <Binding Path="Densities[0].Value" UpdateSourceTrigger="PropertyChanged" >
                        <Binding.ValidationRules>
                            <administration:ValidateDensityRule/>
                        </Binding.ValidationRules>
                    </Binding>
                </TextBox.Text>
      </TextBox>

Button Xaml

<Button.Style>
    <Style TargetType="{x:Type Button}" BasedOn="{StaticResource ButtonStyle}">
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Text1,Path=(Validation.HasError)}" Value="True">
                                <Setter Property="IsEnabled" Value="False"></Setter>                                    
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Button.Style>

What am i missing here ?

4

1 回答 1

1

我发现了你的问题。

您使用字符串作为滑块的最小值/最大值。

http://www.toptrouwen.nl/trouwshoptest - 462/463 行。做parseFloat($("#pricemin").attr('data-message'))等以确保它作为整数值传递,这样它就不会破坏 jQuery-UI

于 2013-11-12T09:56:54.563 回答