Hello Friends,
I need your help again

sample code

<div id="generic_photo125_addinputs"><ul><li><input type="button"/></li></ul></div>

The above code generated automatically, i like to hide the button inside the li, Now the problem is all the ids, class everything is generated dynamically,so i cant able to target the button based on the selector,Is it possible to select the word "photo125" using contains method? your help will be greatly appreciated.

Recommended Answers

Maybe you could use find()?

Jump to Post

All 2 Replies

Maybe you could use find()?

yes you can. You can select it like this:

var choice = 125;

$("div[id*=photo" + choice + "]")

I have provided a sample see link: JSFiddle Example

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.